2 Replies Latest reply on Dec 18, 2006 8:25 AM by legolas.w

    how we can lookup the JNDI of a remote Jboss from within our



      Hi
      Thank you for reading my post
      we have an application deployed into two seperate Jboss application server.
      What we need is sending some JMS message to a queue and topic of the remote Jboss application server.
      what we can not do is initializing a context for the second application server which is running on another mchine over interanet.
      can some one help me with initializing a context to lookup into the JNDI of the second application server?


      Thanks

        • 1. Re: how we can lookup the JNDI of a remote Jboss from within
          jaikiran

          Not sure i understand the question right. Your code in appserver1 can do the following:

          Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
          env.put(Context.PROVIDER_URL,"jnp://theSecondServerName:1099");
          Context remoteCtx = new InitialContext(env);
          remoteCtx.lookup(....);
          


          You can even place the address of the second server in the jndi.properties file which accepts a comma separated value for the java.naming.provider.url property

          • 2. Re: how we can lookup the JNDI of a remote Jboss from within

            Thank you for reply.
            It was what i need.
            is there any way to apply some authentication for this?
            I mean someway to prevent other people from looking into our JNDI?

            Thanks