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(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
environment.put(InitialContext.PROVIDER_URL, "jnp://" + jndi);
InitialContext init = new InitialContext(environment);
ClusteredEjbInterface ejb = (ClusteredEjbInterface) init.lookup("ClusteredEjb");

CQFD :D

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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to