]
Charles Crouch commented on JBAS-6672:
--------------------------------------
After talking this through with ian the approach we're going to try is as follows:
1) for non-primitive properties call setValue(null) and setRemoved(true) when the unset
box is checked, this should hopefully cause the managedresource to use its default value,
which will be return to the PS when we request it
2) for primitive properties, we will continue as we are today and unset box just won't
work, we need to update our descriptions of those properties to make this clear.
So long story short, there should be no further changes on the JBAS side to support this,
assuming the above works. In the future we need to look at getting the PS to support
defaults on the managed properties
My comment "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." is a separate issue. These values are being
returned from the managed resource itself. We'll need to decide later if there is
anything we can do about in terms of getting "unset" returned rather than the
actual default valuies
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: