Issue Details (XML | Word | Printable)

Key: GLASSFISH-18050
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Satish Kumar
Reporter: saradak
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

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

Created: 19/Dec/11 10:52 PM   Updated: 04/Jan/12 07:35 AM   Resolved: 04/Jan/12 07:35 AM
Component/s: jms
Affects Version/s: 3.1.2_b14
Fix Version/s: None

Time Tracking:
Not Specified

Tags: 3_1_2-review
Participants: amyk, Nazrul, saradak and Satish Kumar


 Description  « Hide

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



Nazrul added a comment - 21/Dec/11 07:45 PM

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


amyk added a comment - 21/Dec/11 08:49 PM - 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


Satish Kumar added a comment - 30/Dec/11 05:39 PM

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()); + }

Satish Kumar added a comment - 30/Dec/11 05:45 PM
  • 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 added a comment - 04/Jan/12 07:35 AM

checked-in the fix