Bug 752431

Summary: [jboss-as-5] type-mapping value for datasources is not validated against the set of configure type mappings
Product: [Other] RHQ Project Reporter: Stefan Negrea <snegrea>
Component: PluginsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.2CC: hrupp
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Negrea 2011-11-09 13:37:24 UTC
Description of problem:
RHQ fails to validate the value of type mapping for datasource configurations. The user can enter an arbitrary type mapping that is not defined in conf/standardjbosscmp-jdbc.xml. This does affect the configuration of the particular datasource making it unusable, but it does not affect anything else. The server will display errors on start but will continue to work as expected.

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

How reproducible:
Always

Steps to Reproduce:
1. Add an AS5 instance to RHQ inventory
2. Navigate to the datasource resource's Configuration tab
3. Type an invalid type mapping name (eg. "Test123") under Advanced / Metadata / Type Mapping

Actual results:
There are NO errors on saving the configuration update.

Expected results:
The type mapping should be validated, flagged as bad value, and errors should be displayed.

Additional info:
This validation process needs to be implemented for all available types datasources.

Comment 1 Stefan Negrea 2011-11-09 13:38:20 UTC
The proposed validation is complex because it involves retrieving current type mappings from the JMX interface; the list of type mappings is not available on the profile service.