[jboss-user] [Clustering/JBoss] - Re: Ejb clustered registering

tfranconville do-not-reply at jboss.com
Wed Feb 6 06:24:49 EST 2008

Thanks a lot for your help.
I have found this solution:

I need to launch jboss with a binding address.

To found the jndi locally we work with, I do this:
Context jbossCtx = new InitialContext();
MBeanServerConnection server = (MBeanServerConnection) jbossCtx.lookup("jmx/invoker/RMIAdaptor");
name = server.getAttribute(new ObjectName("jboss:service=Naming"),"BindAddress") + ":" + server.getAttribute(new ObjectName("jboss:service=Naming"), "Port");

We share some data associated with our jndi address into PojoCache.
So we can found distant ejb and call them as we need.
Hashtable environment = new Hashtable();
environment.put(InitialContext.PROVIDER_URL, "jnp://" + jndi);
InitialContext init = new InitialContext(environment);
ClusteredEjbInterface ejb = (ClusteredEjbInterface) init.lookup("ClusteredEjb");


Many thanks Brian, for your help and your responsiveness.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126951#4126951

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126951

More information about the jboss-user mailing list