Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keep RMI Server and Registy Running

 
Renato Mascardo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had a quick question. If I use:
Registry registry = LocateRegistry.createRegistry(1099);
to create a new registry in my server, what is the best approach to keep the server running as it recieves requests? The infinite while loop works but that doesn't seem very efficient.
If I let the program exit then the registry isn't available anymore.
Am I Missing something here?
Thoughts?
-rjm
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Renato
Once you have bound your service to the registry, your application should keep running, and hence the registry will keep running.
Regards, Andrew
 
Renato Mascardo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andrew Monkhouse:
Hi Renato
Once you have bound your service to the registry, your application should keep running, and hence the registry will keep running.
Regards, Andrew

Thanks Andrew ... looks like I just saw that this morning. There was something wrong with my code in that it didn't keep running after it started up the registry. I'll repost as soon as I figure out what it was.
-rjm
 
Renato Mascardo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it ... forgot to have the impl object extend the unicastremoteobject.
Thanks!
-rjm
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic