Aug 4th, 2010, 09:15 AM
RMI Graceful Shutdown
I am exposing a service using Spring RMI with the RmiServiceExporter.
I will be using Spring in a stand-alone Java application.
I need to be able to gracefully shut down the Java application.
I want to be able to check if a client is using the RMI service and wait for the client to finish before shutting down.
I imagine I can subclass the RmiServiceExporter and override the destroy() method, but I am not sure how I can tell if the service is in use.
Does anyone know how this can be done?