Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6620 JON/Open Console Issues
  3. 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)

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ips Ian Springer
                  Reporter:
                  ips Ian Springer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: