java - Server RMI stop automatically when I start it -


i'm frensh sorry english.

i'm trying start server rmi application stop whitout error :

here code:

public class server {

public static void main(string[] args) {      try {            remotefunction  skeleton = (remotefunction) unicastremoteobject.exportobject(new functionimpl(), 0);           int port = integer.parseint(jndiprop.getstring("port"));          registry registry = locateregistry.createregistry(port);           registry.rebind(jndiprop.getstring("url"), skeleton);           system.out.println("rmi start");      } catch (exception e) {         e.printstacktrace();     }     } 

}

the port , url ok.

someone can me ?

you must store registry in static variable. otherwise can garbage-collected, leads train of events allows whole jvm exit.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -