This content has been marked as final.
Show 1 reply
-
1. Re: RMI Registry
blairj Jul 16, 2002 11:42 PM (in response to iamjinxed)There is not a RMIRegistry running in JBoss. Instead there is a JNDI naming service. The best way I have found to deal with the need for a rmiregistry is to have your App create it's own rmiregistry using
<Code block>
Remote myRemoteObj;
Registry myReg =LocateRegistry.createRegistry(<port number>);
myReg.bind("myobj", myRemoteObj);
</Code block>
Then create a javax.naming.Reference which you can bind to the JNDI tree. And the get a javax.naming.InitialContext and rebind the Reference object to the JNDI tree. To access your remote object do a normal JNDI lookup and cast the resulting object to your Remote Interface. For more info go look at the JNDI tutorial at http://java.sun.com