1 Reply Latest reply on Nov 25, 2004 5:09 AM by sirwio

    Activatable objects - rmid woes.

    sirwio Newbie


      Anyone knows howto to implement activatable objects in jboss. I have build some activatable objects, services, using java.rmi.activation.Activatable and the rmi deamon rmid. Now I would like to port these services one by one to jboss so the first step is to get the existing code to work in jboss.

      I'm new to jboss so if someone could provide me with some basic guidance on this I would really appreciate it.


        • 1. Re: Activatable objects - rmid woes.
          sirwio Newbie

          This is the way I accomplished deploying our activatable services in jboss.

          First I start rmid on a different port than the default 1098 - I choose port 1234. This is done by supplying -port 1234 as argument to rmid.

          The activation framework needs to know what port rmid is using. This is done by setting the property -Djava.rmi.activation.port=1234

          I also changed to port of the rmiregistry to 1235 from the default 1099. This is achived by supplying 1235 as argument to rmiregistry as in:
          C:>rmiregistry 1235

          My activatable server now deploy correctly in jboss.

          Now I would like to move to use jndi instead of the rmiregistry. I have done some basic tests and it works fine using JBossNS!

          Problem is that some of our activatable services are likely to be deployed on pure tomcat containers. Since I would like to keep a common codebase. It bothers me that I cannot unify the way I for instance rebind my interfaces.

          Context ctx = new InitialContext();
          ctx.rebind("jnp://theServer:1099/IServiceA", iServiceA);


          Naming.rebind("//theNamingServer:1099/IServiceA", iServiceA);

          I guess I could switch to jndi and use the rmi provider as:

          Context ctx = new InitialContext();
          ctx.rebind("rmi://theServer:1099/IServiceA", iServiceA);

          My question is: How do people handle different naming services using the same codebase?