• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Shutting down RMI

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic