Remote objects extending UnicastRemoteObject
are automatically exported to the RMI system after their creation.
When the application is terminated, a thread will continue to run until all exported objects are collected by the remote garbage collector. This can be expedited by explicitely unexporting the objects before terminating the application (UnicastRemoteObject.unexportObject(obj, force)
)
I know how to maintain a list of remote objects created, for example this solution.
I would like to know if the JVM maintains a user-accessible list of objects that have been exported, and are not yet unexported?
No it doesn't. There is a private table of course, but none of your business.