2 Replies Latest reply on Apr 6, 2004 4:45 PM by xu2000

    problem using JBoss JMS client with other JMS servers

    xu2000

      Hello,

      I am trying to use a JBoss JMS client (on an AIX machine) to connect to other application servers such as Sun J2EE server located on a different host. I am experiencing some problem with JNDI lookup. By default, Sun J2EE server uses iiop and JBoss uses jnp as the JNDI protocol. I am trying to use iiop for JBoss to lookup objects in the J2EE server. Below is my property setting:

      java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      java.naming.provider.url=iiop://:1050

      After I create an InitialContext, I do a list() on the default context. Here is what I get:

      ServerObject: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      tbsdev-nt.com\.sun\.jms\.service\.JMSService\.IIOP: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      RemoteLogReader: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      WebInstaller: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      JarInstaller: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      J2EE_UNIQUE_VALUE_GEN: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      DatabaseInformation: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      ServerConfiguration: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      Realm_Manager: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...
      SerialContextProvider: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:...

      If I do a lookup on the ConnectionFactory or any queue/topic I created in the Sun J2EE server, I would get the following exception:

      javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

      Does anybody know how I can access JMS context in Sun J2EE server from JBoss client using iiop? I have been struggling with this for a few days. Any help will be appreciated.

      Thanks.

        • 1. Re: problem using JBoss JMS client with other JMS servers

          Does the same code work from a plain java client?

          If you are configuring your own initial context jnp will have no affect.

          Regards,
          Adrian

          • 2. Re: problem using JBoss JMS client with other JMS servers
            xu2000

            I am not using jnp here. Sun J2EE server does not support jnp, does it?
            Basically, I am seeking a way to talk to JMS queues/topics in other application servers (e.g. Sun J2EE, WebSphere, etc) from JBoss client code with/without JBoss server running. I am using iiop for this (is there any other way?). But connecting to port 1050 using iiop does not give me the JMS conext. All I got is the list of objects shown in my first post. Any idea what's going on? Thanks.