Bug 1038993 - Not possible change the object store type from hornetq to jdbc via cli commands
Summary: Not possible change the object store type from hornetq to jdbc via cli commands
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Transaction Manager
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER1
: EAP 6.3.0
Assignee: Ivo Studensky
QA Contact: Ondrej Chaloupka
Nidhi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-06 10:16 UTC by Ondrej Chaloupka
Modified: 2014-06-28 15:28 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-06-28 15:28:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-3046 0 Major Resolved Not possible change the object store type from hornetq to jdbc via cli commands 2016-01-14 16:34:18 UTC

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:
https://github.com/jbossas/jboss-eap/pull/1140

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.


Note You need to log in before you can comment on or make changes to this bug.