[jboss-jira] [JBoss JIRA] Commented: (JBAS-6203) "config-property" property on Local Datasource managed component returns incorrect MetaType
Scott M Stark (JIRA)
jira-events at lists.jboss.org
Wed Feb 18 21:08:44 EST 2009
[ https://jira.jboss.org/jira/browse/JBAS-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12453171#action_12453171 ]
Scott M Stark commented on JBAS-6203:
-------------------------------------
I'm not understanding what the issue is. The expected type is MapCompositeMetaType and the expected value is a CompositeValue of type MapCompositeValueSupport. This is what I see:
public void testDefaultDSPropertiesAreMetaValues()
throws Exception
{
ManagementView mgtView = getManagementView();
ComponentType type = new ComponentType("DataSource", "LocalTx");
ManagedComponent hsqldb = mgtView.getComponent("DefaultDS", type);
Map<String,ManagedProperty> props = hsqldb.getProperties();
validatePropertyMetaValues(props);
// Validate the config-property
ManagedProperty configProperty = hsqldb.getProperty("config-property");
assertNotNull(configProperty);
MetaValue value = configProperty.getValue();
assertTrue("MapCompositeMetaType", value.getMetaType() instanceof MapCompositeMetaType);
log.debug("config-property: "+configProperty);
assertTrue(value instanceof CompositeValue);
log.debug("config-property.value: "+value);
...
outputs:
974 [main] DEBUG org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - config-property: ManagedProperty{config-property,managedConnectionFactoryProperties,metaType=MapCompositeMetaType{java.util.Map}}
975 [main] DEBUG org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - config-property.value: MapCompositeMetaType{java.util.Map items=[name=ConnectionProperties type=java.lang.String], [name=ConnectionProperties.type type=java.lang.String], [name=ConnectionURL type=java.lang.String], [name=ConnectionURL.type type=java.lang.String], [name=DriverClass type=java.lang.String], [name=DriverClass.type type=java.lang.String], [name=Password type=java.lang.String], [name=Password.type type=java.lang.String], [name=PreparedStatementCacheSize type=java.lang.String], [name=PreparedStatementCacheSize.type type=java.lang.String], [name=QueryTimeout type=java.lang.String], [name=QueryTimeout.type type=java.lang.String], [name=SharePreparedStatements type=java.lang.String], [name=SharePreparedStatements.type type=java.lang.String], [name=TrackStatements type=java.lang.String], [name=TrackStatements.type type=java.lang.String], [name=TransactionQueryTimeout type=java.lang.String], [name=TransactionQueryTimeout.type type=java.lang.String], [name=UseTryLock type=java.lang.String], [name=UseTryLock.type type=java.lang.String], [name=UserName type=java.lang.String], [name=UserName.type type=java.lang.String], [name=ValidateOnMatch type=java.lang.String], [name=ValidateOnMatch.type type=java.lang.String]}:{TransactionQueryTimeout.type=SimpleMetaType:java.lang.String:false, UserName.type=SimpleMetaType:java.lang.String:sa, ValidateOnMatch=SimpleMetaType:java.lang.String:true, ConnectionProperties.type=SimpleMetaType:java.lang.String:, SharePreparedStatements=SimpleMetaType:java.lang.String:false, QueryTimeout.type=SimpleMetaType:java.lang.String:0, TrackStatements=SimpleMetaType:java.lang.String:, UseTryLock=SimpleMetaType:java.lang.String:0, Password=SimpleMetaType:java.lang.String:, TrackStatements.type=SimpleMetaType:java.lang.String:, ConnectionURL.type=SimpleMetaType:java.lang.String:jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB, SharePreparedStatements.type=SimpleMetaType:java.lang.String:false, ValidateOnMatch.type=SimpleMetaType:java.lang.String:true, PreparedStatementCacheSize.type=SimpleMetaType:java.lang.String:32, UseTryLock.type=SimpleMetaType:java.lang.String:0, TransactionQueryTimeout=SimpleMetaType:java.lang.String:false, PreparedStatementCacheSize=SimpleMetaType:java.lang.String:32, DriverClass=SimpleMetaType:java.lang.String:org.hsqldb.jdbcDriver, ConnectionProperties=SimpleMetaType:java.lang.String:, UserName=SimpleMetaType:java.lang.String:sa, DriverClass.type=SimpleMetaType:java.lang.String:org.hsqldb.jdbcDriver, QueryTimeout=SimpleMetaType:java.lang.String:0, Password.type=SimpleMetaType:java.lang.String:, ConnectionURL=SimpleMetaType:java.lang.String:jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB}
> "config-property" property on Local Datasource managed component returns incorrect MetaType
> -------------------------------------------------------------------------------------------
>
> Key: JBAS-6203
> URL: https://jira.jboss.org/jira/browse/JBAS-6203
> Project: JBoss Application Server
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: ProfileService
> Reporter: Ian Springer
> Assignee: Scott M Stark
> Priority: Critical
> Fix For: JBossAS-5.0.0.GA
>
>
> managedProperties.get("config-property").getValue() returns a CollectionValueSupport
> yet managedProperties.get("config-property").getMetaType() returns a MapCompositeMetaType. I'm pretty sure it should instead be returning a CollectionMetaType, which is the MetaType that corresponds to CollectionValue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list