[jboss-jira] [JBoss JIRA] Commented: (JBAS-6672) when null values are specified for ManagedProperties, then updateComponent() is called, the values are updated to incorrect defaults (e.g. "0" for integer properties)
Charles Crouch (JIRA)
jira-events at lists.jboss.org
Thu Apr 9 13:10:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBAS-6672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12461541#action_12461541 ]
Charles Crouch commented on JBAS-6672:
--------------------------------------
If you deploy a datasource such as this:
<datasources>
<no-tx-datasource>
<jndi-name>JustReqsDS</jndi-name>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
</no-tx-datasource>
</datasources>
and view its configuration in the console, you'll the 3 properties above specified plus a bunch of different properties set which aren't specified in the xml file. Here is a selection...
Minimum Pool Size: 0
Maximum Pool Size: 10
Blocking Timeout in Milliseconds : 30000
Idle Timeout: 30
Set Tx Query Timeout: No
....
The same thing happens when you create a datasource through the console and specify just the required properties, leaving everything else unset. When you go back to view the configuration all of the properties above are set, when they should continue to be unset.
>From the associated thread (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=152942) I stated:
"So overall the most important thing is to have property.setRemoved() cause nothing to be persisted for the managed property, and that a default (if specified somewhere) is applied to the actual running instance. [This could just be letting the component itself choose the default, I don't think it has to come from the ManagedProperty annotation for CR1, though it would make sense in the future.] This is what I see as the core issue that needs resolving for CR1."
This doesn't seem to be happeing right now. In the case of viewing the configuration of a DS specified in xml the values which are not set in the xml seem to be persisted into the managed properties which are then returned to the console.
> when null values are specified for ManagedProperties, then updateComponent() is called, the values are updated to incorrect defaults (e.g. "0" for integer properties)
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-6672
> URL: https://jira.jboss.org/jira/browse/JBAS-6672
> Project: JBoss Application Server
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: ProfileService
> Reporter: Ian Springer
> Assignee: Scott M Stark
> Priority: Blocker
> Fix For: JBossAS-5.1.0.CR1
>
>
> For example, max-pool-size ends up with a value of "0", when its default should be some sensible non-zero value (default was "20" in JBAS4).
> Here's what the managed properties look like on a Conn Factory component before I call updateComponent():
> name=allocation-retry, mappedName=allocationRetry, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:null
> name=allocation-retry-wait-millis, mappedName=allocationRetryWaitMillis, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:null
> name=availableConnectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:10
> name=background-validation, mappedName=backgroundValidation, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:false
> name=background-validation-millis, mappedName=backgroundValidationMillis, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:null
> name=blocking-timeout-millis, mappedName=blockingTimeoutMilliSeconds, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:null
> name=config-property, mappedName=managedConnectionFactoryProperties, viewUse=CONFIGURATION, required=false, value= MapCompositeMetaType{java.util.Map}:{}
> Items:
> name=connection-definition, mappedName=connectionDefinition, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:org.jboss.resource
> .adapter.jms.JmsConnectionFactory
> name=connectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=connectionCreatedCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=connectionDestroyedCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=idle-timeout-minutes, mappedName=idleTimeoutMinutes, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:null
> name=inUseConnectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:0
> name=interleaving, viewUse=NONE, required=false, type=SimpleMetaType, value= <<<null>>>
> name=isSameRM-override-value, mappedName=isSameRMOverrideValue, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=jmx-invoker-name, mappedName=jmxInvokerName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:jboss:service=invoker,type=jrmp
> name=jndi-name, mappedName=jndiName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:151d5359-bf58-48d7-a02b-2fe74f9c5a88
> name=local-transaction, mappedName=localTransactions, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:true
> name=max-pool-size, mappedName=maxSize, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:null
> name=maxConnectionsInUseCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:0
> name=maxSize, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:10
> name=metadata, mappedName=DBMSMetaData, viewUse=CONFIGURATION, required=false, value= CompositeValueSupport: metaType=[MutableCompositeMetaType{org.jboss.resource.metadata.mcf.DBMSMetaData items=[name=typeMapping type=java.lang.String]}] items=[typeMapping=null]
> Items:
> typeMapping=<<<null>>>
> name=min-pool-size, mappedName=minSize, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:null
> name=minSize, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=no-tx-separate-pools, mappedName=noTxSeparatePools, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=poolJndiName, viewUse=RUNTIME, required=false, value= SimpleMetaType:java.lang.String:151d5359-bf58-48d7-a02b-2fe74f9c5a88
> name=prefill, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=rar-name, mappedName=rarName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:jms-ra.rar
> name=security-domain, mappedName=securityMetaData, viewUse=CONFIGURATION, required=false, value= GenericMetaType:security-domain:ManagedObject{security-domai
> n}
> name=statistics-formatter, mappedName=statisticsFormatter, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:org.jboss.resource.s
> tatistic.pool.JBossDefaultSubPoolStatisticFormatter
> name=track-connection-by-tx, mappedName=trackConnectionByTransaction, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:true
> name=type-mapping, mappedName=typeMapping, viewUse=CONFIGURATION, required=false, type=SimpleMetaType, value= <<<null>>>
> name=use-java-context, mappedName=useJavaContext, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:true
> name=use-strict-min, mappedName=useStrictMin, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=validate-on-match, mappedName=validateOnMatch, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:true
> name=xa-resource-timeout, mappedName=xaResourceTimeout, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:null
> name=xa-transaction, mappedName=XATransaction, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> And here's what they look like after updateComponent() is called:
> name=allocation-retry, mappedName=allocationRetry, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:0
> name=allocation-retry-wait-millis, mappedName=allocationRetryWaitMillis, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:0
> name=availableConnectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:10
> name=background-validation, mappedName=backgroundValidation, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:false
> name=background-validation-millis, mappedName=backgroundValidationMillis, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:0
> name=blocking-timeout-millis, mappedName=blockingTimeoutMilliSeconds, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:long:0
> name=config-property, mappedName=managedConnectionFactoryProperties, viewUse=CONFIGURATION, required=false, value= MapCompositeMetaType{java.util.Map}:{}
> Items:
> name=connection-definition, mappedName=connectionDefinition, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:org.jboss.resource
> .adapter.jms.JmsConnectionFactory
> name=connectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=connectionCreatedCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=connectionDestroyedCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=idle-timeout-minutes, mappedName=idleTimeoutMinutes, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:0
> name=inUseConnectionCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:0
> name=interleaving, viewUse=NONE, required=false, type=SimpleMetaType, value= <<<null>>>
> name=isSameRM-override-value, mappedName=isSameRMOverrideValue, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=jmx-invoker-name, mappedName=jmxInvokerName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:jboss:service=invoker,type=jr
> mp
> name=jndi-name, mappedName=jndiName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:151d5359-bf58-48d7-a02b-2fe74f9c5a88
> name=local-transaction, mappedName=localTransactions, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:true
> name=max-pool-size, mappedName=maxSize, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:0
> name=maxConnectionsInUseCount, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Long:0
> name=maxSize, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:10
> name=metadata, mappedName=DBMSMetaData, viewUse=CONFIGURATION, required=false, value= CompositeValueSupport: metaType=[MutableCompositeMetaType{org.jboss.res
> ource.metadata.mcf.DBMSMetaData items=[name=typeMapping type=java.lang.String]}] items=[typeMapping=null]
> Items:
> typeMapping=<<<null>>>
> name=min-pool-size, mappedName=minSize, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:0
> name=minSize, viewUse=STATISTIC, required=false, value= SimpleMetaType:java.lang.Integer:0
> name=no-tx-separate-pools, mappedName=noTxSeparatePools, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=poolJndiName, viewUse=RUNTIME, required=false, value= SimpleMetaType:java.lang.String:151d5359-bf58-48d7-a02b-2fe74f9c5a88
> name=prefill, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=rar-name, mappedName=rarName, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:jms-ra.rar
> name=security-domain, mappedName=securityMetaData, viewUse=CONFIGURATION, required=false, type=GenericMetaType, value= <<<null>>>
> name=statistics-formatter, mappedName=statisticsFormatter, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.String:org.jboss.resource.s
> tatistic.pool.JBossDefaultSubPoolStatisticFormatter
> name=track-connection-by-tx, mappedName=trackConnectionByTransaction, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:true
> name=type-mapping, mappedName=typeMapping, viewUse=CONFIGURATION, required=false, type=SimpleMetaType, value= <<<null>>>
> name=use-java-context, mappedName=useJavaContext, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:true
> name=use-strict-min, mappedName=useStrictMin, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> name=validate-on-match, mappedName=validateOnMatch, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:boolean:true
> name=xa-resource-timeout, mappedName=xaResourceTimeout, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:int:0
> name=xa-transaction, mappedName=XATransaction, viewUse=CONFIGURATION, required=false, value= SimpleMetaType:java.lang.Boolean:false
> Notice, how all of the integer properties that had null values now have values of "0", which in most cases, is not the correct default.
> Another option besides setting the values to the correct defaults is for the profile service to just leave the values set to null, which would tell the user that the underlying component's builtin default will be used.
--
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