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

Shutting down RMI

 
Roy Mallard
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program shuts down properly in standalone mode, but when I run it in client or server mode the following threads keep running for a couple of minutes after the GUI disappears:
Timer-0
Java2D Disposer
AWT-Windows
DestroyJavaVM
TimerQueue

I think this is because I am using RMI. How am I supposed to shut down RMI elegantly so that the whole program exits quickly?
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roy

There is no way to do this in a elegant way.You can unbind th remote objects, remove them from the Run-Tine but this is still not enought.
I do this with the "System.exit"

Regards M.
 
Oliver Weikopf
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I do when exiting the server is registry.unbind(). But even when I leave that out, and do nothing at all to finish RMI, no threads keep running. So I'd doubt that your problem is RMI-related.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic