glassfish
  1. glassfish
  2. GLASSFISH-16938

Glassfish embedded runs JMSRA broker in REMOTE mode regardless of settings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1.1, 4.0
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      all platforms

      Description

      I wrote an unit test which runs an embedded glassfish server and deploy my application on it:

      String glassfishHome = "src/test/glassfish";
      String instanceRoot = glassfishHome + "/domains/some-domain";
      String configFile = instanceRoot + "/config/domain.xml";
      
      Map<String, String> props = new HashMap<String, String>();
      props.put("org.glassfish.ejb.embedded.glassfish.installation.root", installRoot);
      props.put("org.glassfish.ejb.embedded.glassfish.instance.root", instanceRoot);
      props.put("org.glassfish.ejb.embedded.glassfish.configuration.file", configFile);
      props.put(EJBContainer.APP_NAME, "appName");
      
      ejbContainer = EJBContainer.createEJBContainer(props);
      

      The domain.xml file contains (among others) the following configuration:

      <jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host host="localhost" name="default_JMS_host"></jms-host>
      </jms-service>
      

      Everything is OK until my application contains MDB beans. In such situation JMSRA broker is run but in REMOTE mode, what can be seen in logs:

       
      2011-07-01 12:07:53 com.sun.messaging.jms.ra.ResourceAdapter start
      INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version:  4.5  (Build 29-b) Compile:  Wed Feb  9 22:53:30 PST 2011
      2011-07-01 12:07:53 com.sun.messaging.jms.ra.ResourceAdapter start
      INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is REMOTE, connection mode is TCP
      2011-07-01 12:07:53 com.sun.messaging.jms.ra.ResourceAdapter start
      INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:REMOTE
      

      Because of this mode my MDB beans cannot connect to this remote broker and deployment of the application fails!

      When the same domain.xml file is used in a standalone glassfish installation my application works. JMSRA is run in the propper mode: EMBEDDED.

      Why a glassfish embedded server runs JMSRA broker in REMOTE mode regardless of the setting?

      1. run.log
        6 kB
        Satish Kumar

        Activity

        michal_kozak created issue -
        Satish Kumar made changes -
        Field Original Value New Value
        Assignee Satish Kumar [ sats ] marina vatkina [ mvatkina ]
        Satish Kumar made changes -
        Component/s ejb_container [ 10596 ]
        Component/s jms [ 10604 ]
        Satish Kumar made changes -
        Attachment run.log [ 46567 ]
        marina vatkina made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 3.1.1 [ 14740 ]
        Fix Version/s 3.2 [ 10969 ]
        Resolution Fixed [ 1 ]
        Jill Sato made changes -
        Fix Version/s 4.0 [ 10970 ]
        Fix Version/s 3.2 [ 10969 ]

          People

          • Assignee:
            marina vatkina
            Reporter:
            michal_kozak
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: