glassfish
  1. glassfish
  2. GLASSFISH-18050

--dbvendor option in configure-jms-cluster should set both imq.persist.jdbc.dbVendor and imq.cluster.sharecc.persist.mysql.dbVendor internally

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b14
    • Fix Version/s: None
    • Component/s: jms
    • Labels:
      None

      Description

      steps to produce the problem
      ----------------------------

      1. Create cluster cluster1
      2. Configure jms cluster with configstoretype shareddb

      ./asadmin configure-jms-cluster --clustertype=conventional --configstoretype=shareddb --messagestoretype=jdbc --dbvendor=mysql --dbuser=root --dburl="jdbc:mysql://hostname:portno/dbname?password=xxxx" cluster1

      3. Start the cluster cluster1.
      4. Following exceptions were thrown in broker log file

      [16/Dec/2011:09:23:41 PST] Arguments: -port 27676 -name cluster1inst1 -nobind -imqhome /opt/SUNWappserver/glassfish3/mq -varhome /opt/SUNWappserver/glassfish3/glassfish/nodes/localhost-domain1/inst1/imq -libhome /opt/SUNWappserver/glassfish3/mq/lib -useRmiRegistry -rmiRegistryPort 28686 -save -silent
      [16/Dec/2011:09:23:41 PST] JMSRA BrokerProps: imq.service.activate=jmsdirect, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.cluster.nowaitForMasterBroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.jmsra.managed=true, imq.cluster.nomasterbroker=true, imq.cluster.clusterid=cluster1_MQ, imq.imqcmd.password=*****, imq.persist.store=jdbc, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot
      [16/Dec/2011:09:23:41 PST] Broker Properties: imq.jmx.rmiregistry.use=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot, imq.cluster.nomasterbroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.service.runtimeAdd=mqdirect2, imq.persist.store=jdbc, imq.portmapper.bind=false, imq.instancename=cluster1inst1, imq.cluster.clusterid=cluster1_MQ, imq.cluster.nowaitForMasterBroker=true, imq.log.console.output=NONE, imq.service.activate=jmsdirect, imq.jmx.rmiregistry.port=28686, imq.imqcmd.password=*****, imq.jmsra.managed=true, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.portmapper.port=27676
      [16/Dec/2011:09:23:41 PST] Embedded Broker
      [16/Dec/2011:09:23:42 PST] [B1359]: Use a shared store for cluster configuration change records
      [16/Dec/2011:09:23:42 PST] [B1060]: Loading persistent data...
      [16/Dec/2011:09:23:43 PST] ERROR [B3000]: Could not open persistent message store:
      com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3023]: No JDBC driver specified by imq.persist.jdbc.unknown.driver
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.comm.CommDBManager.initDBManagerProps(CommDBManager.java:264)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.<init>(DBManager.java:254)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.getDBManager(DBManager.java:182)
      at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:112)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

      Looks like --dbvendor option is only setting imq.cluster.sharecc.persist.mysql.dbVendor property instead of both imq.persist.jdbc.dbVendor and imq.cluster.sharecc.persist.mysql.dbVendor properties internally.

      There is a workaround that you can pass the imq.persist.jdbc.dbVendor value through the --properties option in the configure-jms-cluster command.

      -Sarada

        Activity

        saradak created issue -
        Hide
        Nazrul added a comment -

        This is blocking UI testing. Requesting Amy for help. Please try the console when you verify this fix.

        Show
        Nazrul added a comment - This is blocking UI testing. Requesting Amy for help. Please try the console when you verify this fix.
        Nazrul made changes -
        Field Original Value New Value
        Assignee Satish Kumar [ sats ] amyk [ amyk ]
        Description
        steps to produce the problem
        ----------------------------

        1. Create cluster cluster1
        2. Configure jms cluster with configstoretype shareddb

        ./asadmin configure-jms-cluster --clustertype=conventional --configstoretype=shareddb --messagestoretype=jdbc --dbvendor=mysql --dbuser=root --dburl="jdbc:mysql://hostname:portno/dbname?password=xxxx" cluster1

        3. Start the cluster cluster1.
        4. Following exceptions were thrown in broker log file

        [16/Dec/2011:09:23:41 PST] Arguments: -port 27676 -name cluster1inst1 -nobind -imqhome /opt/SUNWappserver/glassfish3/mq -varhome /opt/SUNWappserver/glassfish3/glassfish/nodes/localhost-domain1/inst1/imq -libhome /opt/SUNWappserver/glassfish3/mq/lib -useRmiRegistry -rmiRegistryPort 28686 -save -silent
        [16/Dec/2011:09:23:41 PST] JMSRA BrokerProps: imq.service.activate=jmsdirect, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.cluster.nowaitForMasterBroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.jmsra.managed=true, imq.cluster.nomasterbroker=true, imq.cluster.clusterid=cluster1_MQ, imq.imqcmd.password=*****, imq.persist.store=jdbc, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot
        [16/Dec/2011:09:23:41 PST] Broker Properties: imq.jmx.rmiregistry.use=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot, imq.cluster.nomasterbroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.service.runtimeAdd=mqdirect2, imq.persist.store=jdbc, imq.portmapper.bind=false, imq.instancename=cluster1inst1, imq.cluster.clusterid=cluster1_MQ, imq.cluster.nowaitForMasterBroker=true, imq.log.console.output=NONE, imq.service.activate=jmsdirect, imq.jmx.rmiregistry.port=28686, imq.imqcmd.password=*****, imq.jmsra.managed=true, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.portmapper.port=27676
        [16/Dec/2011:09:23:41 PST] Embedded Broker
        [16/Dec/2011:09:23:42 PST] [B1359]: Use a shared store for cluster configuration change records
        [16/Dec/2011:09:23:42 PST] [B1060]: Loading persistent data...
        [16/Dec/2011:09:23:43 PST] ERROR [B3000]: Could not open persistent message store:
        com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3023]: No JDBC driver specified by imq.persist.jdbc.unknown.driver
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.comm.CommDBManager.initDBManagerProps(CommDBManager.java:264)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.<init>(DBManager.java:254)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.getDBManager(DBManager.java:182)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:112)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)



        Looks like --dbvendor option is only setting imq.cluster.sharecc.persist.mysql.dbVendor property instead of both imq.persist.jdbc.dbVendor and imq.cluster.sharecc.persist.mysql.dbVendor properties internally.


        There is a workaround that you can pass the imq.persist.jdbc.dbVendor value through the --properties option in the configure-jms-cluster command.


        -Sarada

        steps to produce the problem
        ----------------------------

        1. Create cluster cluster1
        2. Configure jms cluster with configstoretype shareddb

        ./asadmin configure-jms-cluster --clustertype=conventional --configstoretype=shareddb --messagestoretype=jdbc --dbvendor=mysql --dbuser=root --dburl="jdbc:mysql://hostname:portno/dbname?password=xxxx" cluster1

        3. Start the cluster cluster1.
        4. Following exceptions were thrown in broker log file

        [16/Dec/2011:09:23:41 PST] Arguments: -port 27676 -name cluster1inst1 -nobind -imqhome /opt/SUNWappserver/glassfish3/mq -varhome /opt/SUNWappserver/glassfish3/glassfish/nodes/localhost-domain1/inst1/imq -libhome /opt/SUNWappserver/glassfish3/mq/lib -useRmiRegistry -rmiRegistryPort 28686 -save -silent
        [16/Dec/2011:09:23:41 PST] JMSRA BrokerProps: imq.service.activate=jmsdirect, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.cluster.nowaitForMasterBroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.jmsra.managed=true, imq.cluster.nomasterbroker=true, imq.cluster.clusterid=cluster1_MQ, imq.imqcmd.password=*****, imq.persist.store=jdbc, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot
        [16/Dec/2011:09:23:41 PST] Broker Properties: imq.jmx.rmiregistry.use=true, imq.cluster.sharecc.persist.jdbc.mysql.property.url=jdbc:mysql://intg-v250-1.us.oracle.com:3306/imq?password=imqroot, imq.cluster.nomasterbroker=true, imq.cluster.sharecc.persist.jdbc.dbVendor=mysql, imq.cluster.brokerlist=mq://localhost:27676/,mq://localhost:27677/, imq.cluster.sharecc.persist.jdbc.mysql.user=root, imq.service.runtimeAdd=mqdirect2, imq.persist.store=jdbc, imq.portmapper.bind=false, imq.instancename=cluster1inst1, imq.cluster.clusterid=cluster1_MQ, imq.cluster.nowaitForMasterBroker=true, imq.log.console.output=NONE, imq.service.activate=jmsdirect, imq.jmx.rmiregistry.port=28686, imq.imqcmd.password=*****, imq.jmsra.managed=true, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.portmapper.port=27676
        [16/Dec/2011:09:23:41 PST] Embedded Broker
        [16/Dec/2011:09:23:42 PST] [B1359]: Use a shared store for cluster configuration change records
        [16/Dec/2011:09:23:42 PST] [B1060]: Loading persistent data...
        [16/Dec/2011:09:23:43 PST] ERROR [B3000]: Could not open persistent message store:
        com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3023]: No JDBC driver specified by imq.persist.jdbc.unknown.driver
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.comm.CommDBManager.initDBManagerProps(CommDBManager.java:264)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.<init>(DBManager.java:254)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.getDBManager(DBManager.java:182)
                at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(JDBCStore.java:112)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)



        Looks like --dbvendor option is only setting imq.cluster.sharecc.persist.mysql.dbVendor property instead of both imq.persist.jdbc.dbVendor and imq.cluster.sharecc.persist.mysql.dbVendor properties internally.


        There is a workaround that you can pass the imq.persist.jdbc.dbVendor value through the --properties option in the configure-jms-cluster command.


        -Sarada

        Hide
        amyk added a comment - - edited

        This is a bug in GlassFish JMS module. imq.persist.jdbc.dbVendor must set and be passed to broker(s) when --messagestoretype=jdbc;
        imq.cluster.sharecc.persist.jdbc.dbVendor must set and be passed to broker(s) when --configstoretype=shareddb

        Show
        amyk added a comment - - edited This is a bug in GlassFish JMS module. imq.persist.jdbc.dbVendor must set and be passed to broker(s) when --messagestoretype=jdbc; imq.cluster.sharecc.persist.jdbc.dbVendor must set and be passed to broker(s) when --configstoretype=shareddb
        amyk made changes -
        Assignee amyk [ amyk ] Satish Kumar [ sats ]
        Satish Kumar made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Satish Kumar added a comment -

        This issue only occurs when running in conventional clusters of peer brokers with messagestoretype configured as JDBC. In such a configuration, besides setting the imq.cluster.sharecc.persist.xxx properties, the imq.persist.xxx properties also need to be set. This requires changes to ActiveJmsResourceAdapter.java to supply the imq.persist.xxx parameters to the broker. Svn diffs for the suggested changes are below:

        Index: src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java
        ===================================================================
        — src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java (revision 51810)
        +++ src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java (working copy)
        @@ -516,8 +516,12 @@

        loadDBProperties(ENHANCED_CLUSTER_DB_PREFIX, as.getJmsAvailability());
        }

        • else
          + else { + if ("jdbc".equals(as.getJmsAvailability().getMessageStoreType())) + loadDBProperties(ENHANCED_CLUSTER_DB_PREFIX, as.getJmsAvailability()); + loadDBProperties(CONVENTIONAL_CLUSTER_DB_PREFIX, as.getJmsAvailability()); + }
        Show
        Satish Kumar added a comment - This issue only occurs when running in conventional clusters of peer brokers with messagestoretype configured as JDBC. In such a configuration, besides setting the imq.cluster.sharecc.persist.xxx properties, the imq.persist.xxx properties also need to be set. This requires changes to ActiveJmsResourceAdapter.java to supply the imq.persist.xxx parameters to the broker. Svn diffs for the suggested changes are below: Index: src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java =================================================================== — src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java (revision 51810) +++ src/main/java/com/sun/enterprise/connectors/jms/system/ActiveJmsResourceAdapter.java (working copy) @@ -516,8 +516,12 @@ loadDBProperties(ENHANCED_CLUSTER_DB_PREFIX, as.getJmsAvailability()); } else + else { + if ("jdbc".equals(as.getJmsAvailability().getMessageStoreType())) + loadDBProperties(ENHANCED_CLUSTER_DB_PREFIX, as.getJmsAvailability()); + loadDBProperties(CONVENTIONAL_CLUSTER_DB_PREFIX, as.getJmsAvailability()); + }
        Hide
        Satish Kumar added a comment -
        • What is the impact on the customer of the bug?
          Due to this bug, conventional MQ broker clusters of peer brokers with messagestore type set as JDBC will not work in EMBEDDED and LOCAL modes of integration.

        How likely is it that a customer will see the bug and how serious is the bug?

        Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
        No, this is not a regression and does not meet any other criteria.

        • What is the cost/risk of fixing the bug?
          The changes are fairly simple (see svn diffs in my previous comment). Hence the risk is quite low.
        • Is there an impact on documentation or message strings?
          No
        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
          Standard JMS SQE tests but with MQ configured for conventional clusters of peer brokers with message store type configured to JDBC
        • Which is the targeted build of 3.1.2 for this fix?
          build 17
        Show
        Satish Kumar added a comment - What is the impact on the customer of the bug? Due to this bug, conventional MQ broker clusters of peer brokers with messagestore type set as JDBC will not work in EMBEDDED and LOCAL modes of integration. How likely is it that a customer will see the bug and how serious is the bug? Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? No, this is not a regression and does not meet any other criteria. What is the cost/risk of fixing the bug? The changes are fairly simple (see svn diffs in my previous comment). Hence the risk is quite low. Is there an impact on documentation or message strings? No Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Standard JMS SQE tests but with MQ configured for conventional clusters of peer brokers with message store type configured to JDBC Which is the targeted build of 3.1.2 for this fix? build 17
        Satish Kumar made changes -
        Tags 3_1_2-review
        Hide
        Satish Kumar added a comment -

        checked-in the fix

        Show
        Satish Kumar added a comment - checked-in the fix
        Satish Kumar made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Satish Kumar
            Reporter:
            saradak
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: