Bug 1038993

Summary: Not possible change the object store type from hornetq to jdbc via cli commands
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ondrej Chaloupka <ochaloup>
Component: Transaction ManagerAssignee: Ivo Studensky <istudens>
Status: CLOSED CURRENTRELEASE QA Contact: Ondrej Chaloupka <ochaloup>
Severity: medium Docs Contact: Nidhi <nsriniva>
Priority: unspecified    
Version: 6.2.0CC: brian.stansberry, istudens, kkhan, nsriniva, smumford
Target Milestone: ER1   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, changes to the object store type (from HornetQ to JDBC, or vice versa) through the CLI interface were not propagated correctly. As a result, the object store would remain as initially set (which may have been the less desired option). In this release the write handlers 'use-hornetq-store' and 'use-jdbc-store' have been enhanced to disable the other option when used and the object store used is always the chosen option.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:28:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ondrej Chaloupka 2013-12-06 10:16:30 UTC
When you have set the object store to be type of hornetq and then you change your mind to set it for jdbc object store the jboss-cli permits this operation but no change is propagated to model and XML file.

How to reproduce:
1) ./bin/standalone.xml (start eap 6.2.0.GA)
2) ./bin/jboss-cli.sh -c (connect to running eap)
2a) /subsystem=transactions:write-attribute(name=use-hornetq-store, value=true)
2b) :reload
2c) /subsystem=transactions/log-store=log-store:read-attribute(name=type)
2d) /subsystem=transactions:write-attribute(name=use-jdbc-store, value=true)
2e) :reload
2f) /subsystem=transactions/log-store=log-store:read-attribute(name=type)
 The object store stays to be set to hornetq and no change happens in the standalone.xml file.

Comment 1 Ivo Studensky 2014-02-27 07:57:37 UTC
You need to disable 'use-hornetq-store' first as TransactionSubsystemXMLPersister prefers the hornetq store to the jdbc store, see the code snippet below:

if(node.hasDefined(CommonAttributes.USEHORNETQSTORE) && node.get(CommonAttributes.USEHORNETQSTORE).asBoolean()) {
} else if (node.hasDefined(CommonAttributes.USE_JDBC_STORE) && node.get(CommonAttributes.USE_JDBC_STORE).asBoolean()) {

Other possibility would be to enhance 'use-hornetq-store' and 'use-jdbc-store' write handlers to disable the opposite option.

Comment 2 Brian Stansberry 2014-03-01 00:05:28 UTC
The workaround for this is to change the other attribute before reloading, probably best to do it in a batch.

Comment 3 Ivo Studensky 2014-03-26 14:47:41 UTC
Created PR:

Comment 4 Ondrej Chaloupka 2014-04-16 10:37:48 UTC
Ok, it works for me now. Checked on EAP 6.3.0.ER1.
Thank you.