glassfish
  1. glassfish
  2. GLASSFISH-17133

JMS resouce adapter is not accessable from a java client

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1_b12
    • Fix Version/s: 4.0_b31
    • Component/s: jms
    • Labels:
      None
    • Environment:

      glassfish@centos5, client@eclipse@windows7-64bit

      Description

      Hi,

      I tried to query a JMS factory by JNDI naming service like this:

      InitialContext ctx = new InitialContext(serverContext);
      Object factory = ctx.lookup("jms/responseTopicConnectionFactory");

      The client running this code is a windows machine -
      the glassfish us running on a centos server.

      If i configure the JMS in LOCAL mode, i get the following
      error on the client side, because the client tries to start
      a imqbrokersvc (why?) using the program path from the server:


      SCHWERWIEGEND: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=Cannot run program "C:\opt\glassfish3\mq\bin\imqbrokersvc.exe": CreateProcess error=2, Das Syst\
      em kann die angegebene Datei nicht finden
      29.07.2011 13:44:01 com.sun.messaging.jms.blc.LifecycleManagedBroker start
      INFO: SJSMQ LifecycleManagedBroker configuration=
      brokerInstanceName =n1standalonen1standalone
      brokerBindAddress =null
      brokerPort =27676
      brokerHomeDir =C:\opt\glassfish3\mq
      brokerLibDir =C:\opt\glassfish3\mq\lib
      brokerVarDir =C:\opt\glassfish3\glassfish\nodes\n1\n1.standalone\imq
      brokerJavaDir =C:\opt\jdk1.6.0_26\jre
      brokerArgs =null
      MasterBroker =null
      brokerId =null

      Caused by: java.io.IOException: Cannot run program "C:\opt\glassfish3\mq\bin\imqbrokersvc.exe": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      at java.lang.Runtime.exec(Runtime.java:593)
      at java.lang.Runtime.exec(Runtime.java:466)
      at com.sun.messaging.jmq.admin.jmsspi.JMSAdminImpl.launchAndWatch(JMSAdminImpl.java:794)
      at com.sun.messaging.jmq.admin.jmsspi.JMSAdminImpl.startProvider(JMSAdminImpl.java:789)
      at com.sun.messaging.jms.blc.LocalBrokerRunner.start(LocalBrokerRunner.java:310)
      at com.sun.messaging.jms.blc.LifecycleManagedBroker.start(LifecycleManagedBroker.java:431)


      If I use the EMBEDDED mode, it doesn't work also because the client
      try to access a property file using the wrong filename (Path somewhere on the server)

      All tests was done with glassfish version 3.1.1_b12 and 3.1_stable

      If I use the REMOTE mode and start a standalone /opt/MessageQueue4_5_1/mq/bin/imqbrokerd JMS-Server @centos,
      the lookup works fine - without exception.

      The setup using LOCAL-Mode in glassfish 2.1.1 works fine.

      If I try to start the imqbrokerd from the glassfish bundle, i get an error (but may this is normal):
      [B3276]: Starting a GlassFish-managed broker directly using imqbrokerd is not allowed

      So, i think the JMS MQ resource adapter is broken.

      Workaround: Do not use JMS LOCAL/EMBEDDED typ, but setup a standalone JMS server and
      configure glassfish to use this Server as REMOTE typ.

      Kind regards
      Danny

        Activity

        Hide
        David Zhao added a comment - - edited

        Can not reproduce it against GlassFish 4.0. In my testing, the jms client on win7 sends messages to GF4.0 server (in either LOCAL or EMBEDDED jms service type) on RedHat Linux successfully.

        Show
        David Zhao added a comment - - edited Can not reproduce it against GlassFish 4.0. In my testing, the jms client on win7 sends messages to GF4.0 server (in either LOCAL or EMBEDDED jms service type) on RedHat Linux successfully.

          People

          • Assignee:
            David Zhao
            Reporter:
            danny70437
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: