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:
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);
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?