The server attempts to register the service by calling register() . This may throw a java.rmi.RemoteException , which must be caught. The second parameter to the register() method is a request to the service locator for the length of time to store the service. The time requested may or may not be honored.
The return value is of type ServiceRegistration .