Bug 1010847

Summary: Strange behaviour of setting transaction log-store via jboss-cli
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ondrej Chaloupka <ochaloup>
Component: Transaction ManagerAssignee: Stefano Maestri <smaestri>
Status: CLOSED CURRENTRELEASE QA Contact: Ondrej Chaloupka <ochaloup>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: brian.stansberry, emuckenh, istudens, kkhan
Target Milestone: ER8   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 14:40:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Chaloupka 2013-09-23 07:54:12 UTC
There is non-standard behavior of log-store "address" in jboss-cli.

If you want to change log store type via jboss-cli I suppose that supposed way is via command like:
 /subsystem=transactions:write-attribute(name=use-hornetq-store, value=true)
similarly with jdbc store.

But there is a second way how to get name the transaction object store in use:
/subsystem=transactions/log-store=log-store:read-attribute(name=type)

But when you try to set the type via this way:
/subsystem=transactions/log-store=log-store:write-attribute(name=type, value=hornetq)

you'll get operation success
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
but no change in the model is realized.

There should be some info to user that this way is not supported or this way should correctly work.

Comment 1 Brian Stansberry 2013-09-23 08:39:49 UTC
The CLI component is for the client side tool. Please do not use it for issues related to server side behavior. In cases like this where the issue relates to low level operations, you're describing server side issues.

Comment 2 Ivo Studensky 2013-09-25 09:05:53 UTC
This issue seems to be related to the Narayana integration part, thus I am re-assigning it to Stefano. 

From my PoV the log-store attribute should be read-only and documentation fixed.

Comment 3 Chao Wang 2013-09-25 10:52:21 UTC
For EAP 6, according to attributes description of use-hornetq-store and log-store under Table 15.2 https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/chap-Transaction_Subsystem.html

Both attributes should be set if write one of them. 
However, for EAP 6.1 Table 18.2 https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Administration_and_Configuration_Guide/chap-Transaction_Subsystem.html it does not mention this part.

Agreed with Ivo to set to read-only attribute, if we keep that two attributes synchronization for further release then maybe we could use a new handler extends AbstractWriteAttributeHandler to achieve that.

Comment 4 Ondrej Chaloupka 2013-09-25 11:13:24 UTC
I Agree. The read-only property for the attribute would solve this problem.
Thank you
Ondra

Comment 5 Stefano Maestri 2014-06-13 15:26:02 UTC
PR sent

https://github.com/jbossas/jboss-eap/pull/1456

Comment 6 Ondrej Chaloupka 2014-07-02 08:06:44 UTC
Command
/subsystem=transactions/log-store=log-store:write-attribute(name=type, value=hornetq)
is set as read only and it can't be modified that way.

Verified for EAP 6.3.0.ER8