These exception should be caught by the client and remote objects in order to control the activity of the program if an error is generated. RMI clients access the remote object by obtaining a reference to it through the RMI registry using Naming class. This reference is preformed through the remote object's stub. Multi-user support can be enabled through the used of threads. Since threads are not serializable, they must be implemented and managed within the remote object and not the RMI client.
Session management is effective in controlling database connectivity for multi-user support.
There are several ways in which database sessions can be managed. Garbage collection is managed automaticallly by the RMI runtime environment. The registry is another Java application whose role is to maintain active reference to remote objects. These references are stored within an internal table contained within the registry program. A java Client running on Virtual Machine B needs to request the service from the registry to invoke the method contained within the remote object.