|
From: FReAK La M. <fre...@qu...> - 2003-03-28 10:22:54
|
Hi there, >Could you be more explicit on how you are using createRegistry? I am sorry, I have only used the createRegistry statement, because I wanted to write an application for the wrapper ;-) and I had read that way of getting a RMIRegistry in an article at JavaWorld (http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-rmi.html) >I can always find people saying to use it, but I've not been able to find >any definitive code examples. Some say do it only if getRegistry fails, >and use the one returned by createRegistry. Others never suggest that. >And I've not been able to glean a whole lot from Sun's docs. There is some code in that article mentioned above, maybe that helps you a little bit. As far as I know you have to use createRegistry if there is no RMIRegistry running at the moment. The API states about createRegistry "Creates and exports a Registry on the local host that accepts requests on the specified port." I think that should have the same effect as typing rmiregistry on your console. If you have created an RMIRegistry the you can get this by using getRegistry. This will cause some problems, if there is non existing RMIRegistry at the moment. The API states about this point "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. " http://java.sun.com/products/jdk/1.2/docs/api/java/rmi/registry/LocateRegist ry.html Hope that this information was useful for you and have a nice day, FReAK My latest project: compile Java on Pocket PC http://www.freaklamarsch.de/javacw _____________________________________________ Free email with personality! Over 200 domains! http://www.MyOwnEmail.com Looking for friendships,romance and more? http://www.MyOwnFriends.com |