Bug 1023564

Summary: Typo in EAP 6 plug-in descriptor breaks setting Prepared Statements Cache Size (prepared-statements-cacheSize vs. prepared-statements-cache-size)
Product: [JBoss] JBoss Operations Network Reporter: David <ehle>
Component: Plugin -- JBoss EAP 6Assignee: Thomas Segismont <tsegismo>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.1.2CC: loleary, lzoubek, tsegismo
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1025031 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 852552    
Bug Blocks: 1012435, 1025031    

Description David 2013-10-25 18:51:48 UTC
Description of problem:

JON 3.1.2.GA
Build Number :	
323587d:38819b7
Agent Plugin: JBoss Application Server 7.x Version : 4.4.0.JON312GA

When creating/modifying a datasource, if you enter a value for Prepared Statements Cache Size using the General Props section, the change is not committed. 

The error shows that JON is not saving the property by the right name… so it is considered invalid.
 
"14653: Composite operation failed and was rolled back. Steps that failed:={Operation step-16=JBAS014792: Unknown attribute prepared-statements-cacheSize}}, rolled-back=true"

The invalid part seems to be: prepared-statements-cacheSize 
which should be: prepared-statements-cache-size

Version-Release number of selected component (if applicable):

JON 3.1.2.GA
Build Number :	
323587d:38819b7
Agent Plugin: JBoss Application Server 7.x Version : 4.4.0.JON312GA

How reproducible: Every time the JON tries to set the typo'd parameter and then validate it.


Steps to Reproduce:
1. In JON with plugins listed, Create / modify a datsource
2. try to set Statements Cache Size
3. save and watch for error

Actual results:
"14653: Composite operation failed and was rolled back. Steps that failed:={Operation step-16=JBAS014792: Unknown attribute prepared-statements-cacheSize}}, rolled-back=true"

No change made.

Expected results:
Datsource configuration would be updated if input is otherwise valid


Additional info: 

Looks like problem may have been introduced here:
https://lists.fedorahosted.org/pipermail/rhq-commits/2012-August/009147.html

Workaround - do not use the existing field provided in the JON gui, instead use the Connection Properties and add the field and value manually (Second hand report, need verification) 
See above.  Credit to finding problem to Dev team.

Comment 2 Larry O'Leary 2013-10-30 18:53:42 UTC
(In reply to David from comment #0)
> Workaround - do not use the existing field provided in the JON gui, instead
> use the Connection Properties and add the field and value manually (Second
> hand report, need verification) 

This workaround will not work. The prepared-statement-cache-size setting on a datasource is an attribute of the datasource's statement component. The Connection Properties are only used when building the underlying connection object of the datasource and do not get applied to the statement.

Comment 3 Larry O'Leary 2013-10-30 18:54:48 UTC
Note that the correct attribute name is prepared-statement-cache-size.

Comment 4 Thomas Segismont 2013-10-31 13:52:09 UTC
This was fixed in RHQ4.5 (see bug 852552).

Consequently the fix is already included in JON3.2.

Comment 5 Larry O'Leary 2013-10-31 15:22:00 UTC
The commit from bug 852552 is still not right. The property should be prepared-statement-cache-size.

Comment 6 Thomas Segismont 2013-10-31 17:58:52 UTC
"prepared-statement-cache-size" is the XML element used in configuration files.

"prepared-statements-cache-size" is the attribute name in AS7 and EAP6 management models.

So the commit from bug 852552 is right.

Comment 8 Libor Zoubek 2013-11-18 17:38:26 UTC
verified on ER5