1 Reply Latest reply on Jul 16, 2002 11:42 PM by Blair Jennings

    RMI Registry

    Hugo Hendriks Newbie


      This maybe a dumb question but I couldn't find it anywhere. Does JBoss support RMI and how/where do I register my files in the rmiregistry?

      Thanks in advance

      Hugo Hendriks

        • 1. Re: RMI Registry
          Blair Jennings Newbie

          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