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

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

--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.cluster.dynamicChangeMasterBrokerEnabled=true,
[16/Dec/2011:09:23:41 PST] Broker Properties: imq.jmx.rmiregistry.use=true,, 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.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(
at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.<init>(
at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.getDBManager(
at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.<init>(
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.


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 properties, the properties also need to be set. This requires changes to to supply the parameters to the broker. Svn diffs for the suggested changes are below:

Index: src/main/java/com/sun/enterprise/connectors/jms/system/
— src/main/java/com/sun/enterprise/connectors/jms/system/ (revision 51810)
+++ src/main/java/com/sun/enterprise/connectors/jms/system/ (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?
  • 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