glassfish
  1. glassfish
  2. GLASSFISH-6885

Unable to lookup remote JMS Connection Factory from within server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 9.1peur2
    • Fix Version/s: 4.0
    • Component/s: jms
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      6,885

      Description

      I am using Glassfish 9.1_02 (build b04-fcs) with 2 servers (domain1 and domain2).

      I have created a JMS Connection Factory on server 1: /jms/myFactory

      When I use the following code from a standalone client, I can lookup the factory
      with no issues.

      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
      env.put("org.omg.CORBA.ORBInitialPort", "3700");
      env.put("org.omg.CORBA.ORBInitialHost", "server1");
      env.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
      env.put("java.naming.factory.state",
      "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
      Context ic = new InitialContext(env);
      ConnectionFactory connectionFactory =
      (ConnectionFactory)(ic.lookup("jms/myFactory"));

      However, if I place this code inside an EJB on server2 and try to exercise it, I
      get the following error:

      [#|2008-12-08T14:12:43.768-0700|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=Thread-7;_RequestID=54a6359b-fced-4237-9501-311c7dc551e6;|javax.naming.NameNotFoundException:
      myFactory not found
      at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
      at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
      at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
      at
      com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
      at
      com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
      at
      com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
      at
      com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
      at
      com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
      at
      com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

      This seems to only occur when trying to look up a JMS resource. If I create an
      EJB on server1 I can look it up with no problem using the above code and
      replacing the connection lookup with:

      myEJB ejb = (myEJB)(ic.lookup("myEJB"));

      Is it possible to send/receive JMS messages between servers? If so, how?

      Thanks,

      Joe

        Activity

        janchj created issue -
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 6885 38489
        Ed Bratt made changes -
        Assignee Satish Kumar [ sats ] liang.x.zhao [ liang.x.zhao ]
        Tom Mueller made changes -
        Fix Version/s not determined [ 11149 ]
        Fix Version/s V3 [ 10981 ]
        David Zhao made changes -
        Fix Version/s 4.0 [ 10970 ]
        Fix Version/s not determined [ 11149 ]
        bqin made changes -
        Assignee David Zhao [ liang.x.zhao ] simeng_oracle [ simeng_oracle ]
        Simon Meng made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Simon Meng
            Reporter:
            janchj
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: