1 Reply Latest reply on Aug 5, 2004 10:47 PM by plitvak

    How to expose ConnectionFactory to clients using Global JNDI

    plitvak

      I have this conde inside the servlet

      InitialContext ctx = new InitialContext();
      QueueConnectionFactory qconFactory = (QueueConnectionFactory)ctx.lookup( "java:/ConnectionFactory" );
      

      And surely it provides me with connection factory but when I use
      this code:
      Properties env = new Properties();
      env.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
      env.put( Context.PROVIDER_URL, "jnp://myhost:11099" );
      env.put( "java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces" );
      InitialContext ctx = new InitialContext( env );
      QueueConnectionFactory qconFactory = (QueueConnectionFactory)ctx.lookup( "java:/ConnectionFactory" );
      

      from the client in different JVM I cannot get connection factory.
      I guess this is because the only JNDI name space available for this client is Global JNDI.
      My question is, how would I configure JMS to be able to get connection factory from the client in different JVM?
      Couldn't find answer in FAQ, sorry.