2 Replies Latest reply on Jul 29, 2002 11:46 AM by SApte

    New to JBOSSMQ

    SApte Newbie

      Hello,
      I want to use Java Messaging with JBOSS. Can somebody tell me where i can find the step by step procedures to install and configure JNDI, so that I can refer to the machine(say abc.def.ghi.jkl is the Ip address) from remote machine. I guess i need to do some JNDI settings so that my server machine will be visible to the JMS client running on some other pc.
      Thanks for your help.
      Thanks,
      static.

        • 1. Re: New to JBOSSMQ
          Joel Vogt Master

          In your client you will want something like

          java.util.Hashtable props = new java.util.Hashtable();
          props.put(Context.INITIAL_CONTEXT_FACTORY,
          "org.jnp.interfaces.NamingContextFactory");
          props.put(Context.PROVIDER_URL, ABC.DEF.GHU.JKL);
          props.put("java.naming.rmi.security.manager", "yes");
          props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");

          // Get the initial context with given properties
          Context context = new InitialContext(props);

          // Get the connection factory
          TopicConnectionFactory topicFactory =
          (TopicConnectionFactory)context.lookup(CONNECTION_FACTORY);

          etc...

          You might have to adjust slightly for your version of jboss

          • 2. Re: New to JBOSSMQ
            SApte Newbie

            Hi,
            First of all Thanks for your reply.

            Does this eman that i do not have to do any JNDI settings on JBOSS server?

            If yes it's cool.

            Thanks,
            Subodh