3 Replies Latest reply on Feb 21, 2007 1:38 PM by Andreas Schaefer

    HA-JMS objects lookup in a Cluster

    Andreas Schaefer Apprentice

      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" );
      lProperties.put( Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces" );
      lProperties.put( "jnp.partitionName", "DefaultPartition" ); // partition name.

      it works fine when using a Global Namespace JNDI name but when using a Resource Reference ('java:comp/env') it cannot find that object.

      Using the default InitialContext (new InitialContext()) I can find the Resource Reference (the JNDI link) but it will not find the JMS resource on the HA-JMS when the EJB on a slave node it called because it is not contacting the HAJNDI but the local JNDI server.

      Is there a way to lookup a JMS resource through an EJB resource reference with the default Initial Context?

      Thanx - Andy