|
From: Dongdong Z. <dz...@ur...> - 2003-08-08 18:14:58
|
Hi I am trying to use the transparent RMI package, and found a problem with RmiServiceExporter. In afterPropertiesSet method, LocateRegistry.getRegistry(this.port) is used to detect if the registry is running or not, but getRegistry does not throw RemoteException if no registry running, here is a quote from javadoc for LocateRegistry "Note that a getRegistry call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore, a subsequent method invocation to a remote registry returned as a result of this method may fail" so even if no registry running, getRegistry will return some value, and subsequent rebind will fail. if we call list method on the registry returned by getRegistry, it will throw RemoteException if no registry running. Regards ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag |