I am using an external context 'org.jboss.naming.ExternalContext' which
federates in the JNDI context of a remote JBoss AS. Because I am using HA-JMS
on that remote JBoss AS I need to use the HAJNDI rather than a local JBoss
Naming Server because I do not know which server does actually host
Of course I could use another InitialContext but in my opinion that is a hack
for an EJB on a remote application server. I know that the federated context is
not really EJB standard as well but it would let me use remote EJBs within
ejb-ref or resource-ref within an EJB.
Isn't it strange that
Thank you, that did the trick using 'jnp://localhost:1100/destination JNDI
name' inside the resource reference's JNDI name.
-Andy
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4020151#4020151
Reply to the post :
I have a cluster with HA-JMS running and using an external context to access
object on that cluster from a remote JBoss AS. That works fine with a
standalone JBoss server but not with a cluster because I either need to know at
all times how is the Master JMS node or I need to use HAJNDI.list()
I have a cluster setup with a HA-JMS and now I am trying to lookup a Connection
Factory or Destination from within an EJB deployed on that cluster. Create an
Initial Context like this:
lProperties.put( Context.INITIAL_CONTEXT_FACTORY,
org.jnp.interfaces.NamingContextFactory );
Related to this question is also how to use java:/JmsXA within a cluster
because a HA-JMS slave node will not able to lookup 'java:/JmsXA'. Normally
XAConnectionFactory does not participate in the EJB's own transaction context.
-Andy
View the original post :