7 Replies Latest reply on Feb 8, 2008 5:04 PM by dimitris

    DS stats

    starksm64

      There are properties marked with ViewUse.STATISTIC already, so the testDefaultDSStats should be working. One time I run it and it does, pass:

      31 [main] DEBUG org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - ==== Starting testDefaultDSStats ====
      1687 [main] DEBUG org.jboss.security.SecurityAssociation - Using ThreadLocal: false
      2156 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - Loaded profile: org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]
      2891 [main] DEBUG org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - hsqldb props: {valid-connection-checker-class-name=ManagedProperty{valid-connection-checker-class-name,validConnectionCheckerClassName,metaType=SimpleMetaType:java.lang.String}, validate-on-match=ManagedProperty{validate-on-match,validateOnMatch,metaType=SimpleMetaType:java.lang.Boolean}, connection-url=ManagedProperty{connection-url,connectionUrl,metaType=SimpleMetaType:java.lang.String}, url-delimiter=ManagedProperty{url-delimiter,URLDelimiter,metaType=SimpleMetaType:java.lang.String}, connectionDestroyedCount=ManagedProperty{connectionDestroyedCount,connectionDestroyedCount,metaType=SimpleMetaType:java.lang.Integer}, jmx-invoker-name=ManagedProperty{jmx-invoker-name,jmxInvokerName,metaType=SimpleMetaType:java.lang.String}, noTxSeparatePools=ManagedProperty{noTxSeparatePools,noTxSeparatePools,metaType=SimpleMetaType:java.lang.Boolean}, security-domain=ManagedProperty{security-domain,securityMetaData,metaType=GenericMetaType:org.jboss.managed.api.ManagedObject}, max-pool-size=ManagedProperty{max-pool-size,maxSize,metaType=SimpleMetaType:java.lang.Integer}, share-prepared-statements=ManagedProperty{share-prepared-statements,sharePreparedStatements,metaType=SimpleMetaType:java.lang.Boolean}, statistics-formatter=ManagedProperty{statistics-formatter,statisticsFormatter,metaType=SimpleMetaType:java.lang.String}, maxConnectionsInUseCount=ManagedProperty{maxConnectionsInUseCount,maxConnectionsInUseCount,metaType=SimpleMetaType:java.lang.Long}, set-tx-query-timeout=ManagedProperty{set-tx-query-timeout,useQueryTimeout,metaType=SimpleMetaType:java.lang.Boolean}, type-mapping=ManagedProperty{type-mapping,typeMapping,metaType=SimpleMetaType:java.lang.String}, connection-definition=ManagedProperty{connection-definition,connectionDefinition,metaType=SimpleMetaType:java.lang.String}, idle-timeout-minutes=ManagedProperty{idle-timeout-minutes,idleTimeoutMinutes,metaType=SimpleMetaType:java.lang.Integer}, rar-name=ManagedProperty{rar-name,rarName,metaType=SimpleMetaType:java.lang.String}, check-valid-connection-sql=ManagedProperty{check-valid-connection-sql,checkValidConnectionSQL,metaType=SimpleMetaType:java.lang.String}, connection-properties=ManagedProperty{connection-properties,dataSourceConnectionProperties,metaType=CollectionMetaType{type=java.util.List elementType=GenericMetaType:org.jboss.managed.api.ManagedObject}, connectionCreatedCount=ManagedProperty{connectionCreatedCount,connectionCreatedCount,metaType=SimpleMetaType:java.lang.Integer}, new-connection-sql=ManagedProperty{new-connection-sql,newConnectionSQL,metaType=SimpleMetaType:java.lang.String}, inUseConnectionCount=ManagedProperty{inUseConnectionCount,inUseConnectionCount,metaType=SimpleMetaType:java.lang.Long}, jndi-name=ManagedProperty{jndi-name,jndiName,metaType=SimpleMetaType:java.lang.String}, localTransactions=ManagedProperty{localTransactions,localTransactions,metaType=SimpleMetaType:java.lang.Boolean}, background-validation-minutes=ManagedProperty{background-validation-minutes,backgroundValidationMinutes,metaType=SimpleMetaType:java.lang.Integer}, driver-class=ManagedProperty{driver-class,driverClass,metaType=SimpleMetaType:java.lang.String}, min-pool-size=ManagedProperty{min-pool-size,minSize,metaType=SimpleMetaType:java.lang.Integer}, DBMSMetaData=ManagedProperty{DBMSMetaData,DBMSMetaData,metaType=MutableCompositeMetaType{org.jboss.resource.metadata.mcf.DBMSMetaData items=[name=typeMapping type=java.lang.String]}}, availableConnectionCount=ManagedProperty{availableConnectionCount,availableConnectionCount,metaType=SimpleMetaType:java.lang.Long}, prepared-statement-cache-size=ManagedProperty{prepared-statement-cache-size,preparedStatementCacheSize,metaType=SimpleMetaType:java.lang.Integer}, exception-sorter-class-name=ManagedProperty{exception-sorter-class-name,exceptionSorterClassName,metaType=SimpleMetaType:java.lang.String}, use-strict-min=ManagedProperty{use-strict-min,useStrictMin,metaType=SimpleMetaType:java.lang.Boolean}, track-connection-by-tx=ManagedProperty{track-connection-by-tx,trackConnectionByTransaction,metaType=SimpleMetaType:java.lang.Boolean}, prefill=ManagedProperty{prefill,prefill,metaType=SimpleMetaType:java.lang.Boolean}, password=ManagedProperty{password,passWord,metaType=SimpleMetaType:java.lang.String}, minSize=ManagedProperty{minSize,minSize,metaType=SimpleMetaType:java.lang.Integer}, use-java-context=ManagedProperty{use-java-context,useJavaContext,metaType=SimpleMetaType:java.lang.Boolean}, maxSize=ManagedProperty{maxSize,maxSize,metaType=SimpleMetaType:java.lang.Integer}, stale-connection-checker-class-name=ManagedProperty{stale-connection-checker-class-name,staleConnectionCheckerClassName,metaType=SimpleMetaType:java.lang.String}, blocking-timeout-millis=ManagedProperty{blocking-timeout-millis,blockingTimeoutMilliSeconds,metaType=SimpleMetaType:java.lang.Long}, config-property=ManagedProperty{config-property,managedConnectionFactoryProperties,metaType=CollectionMetaType{type=java.util.List elementType=GenericMetaType:org.jboss.managed.api.ManagedObject}, poolJndiName=ManagedProperty{poolJndiName,poolJndiName,metaType=SimpleMetaType:java.lang.String}, isSameRM-override-value=ManagedProperty{isSameRM-override-value,isSameRMOverrideValue,metaType=SimpleMetaType:java.lang.Boolean}, transaction-isolation=ManagedProperty{transaction-isolation,transactionIsolation,metaType=SimpleMetaType:java.lang.String}, background-validation=ManagedProperty{background-validation,backgroundValidation,metaType=SimpleMetaType:java.lang.Boolean}, track-statements=ManagedProperty{track-statements,trackStatements,metaType=SimpleMetaType:java.lang.String}, connectionCount=ManagedProperty{connectionCount,connectionCount,metaType=SimpleMetaType:java.lang.Integer}, user-name=ManagedProperty{user-name,userName,metaType=SimpleMetaType:java.lang.String}, query-timeout=ManagedProperty{query-timeout,queryTimeout,metaType=SimpleMetaType:java.lang.Integer}, url-selector-strategy-class-name=ManagedProperty{url-selector-strategy-class-name,URLSelectorStrategyClassName,metaType=SimpleMetaType:java.lang.String}}
      2891 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{connectionDestroyedCount,connectionDestroyedCount,metaType=SimpleMetaType:java.lang.Integer}
      2891 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{maxConnectionsInUseCount,maxConnectionsInUseCount,metaType=SimpleMetaType:java.lang.Long}
      2891 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{connectionCreatedCount,connectionCreatedCount,metaType=SimpleMetaType:java.lang.Integer}
      2906 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{inUseConnectionCount,inUseConnectionCount,metaType=SimpleMetaType:java.lang.Long}
      2906 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{availableConnectionCount,availableConnectionCount,metaType=SimpleMetaType:java.lang.Long}
      2906 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{minSize,minSize,metaType=SimpleMetaType:java.lang.Integer}
      2906 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{maxSize,maxSize,metaType=SimpleMetaType:java.lang.Integer}
      2906 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - STATISTIC: ManagedProperty{connectionCount,connectionCount,metaType=SimpleMetaType:java.lang.Integer}
      


      Another time it fails:
      1438 [main] DEBUG org.jboss.security.SecurityAssociation - Using ThreadLocal: false
      1907 [main] INFO org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - Loaded profile: org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]
      2469 [main] DEBUG org.jboss.test.profileservice.test.ProfileServiceUnitTestCase - hsqldb props: {valid-connection-checker-class-name=ManagedProperty{valid-connection-checker-class-name,validConnectionCheckerClassName,metaType=SimpleMetaType:java.lang.String}, jndi-name=ManagedProperty{jndi-name,jndiName,metaType=SimpleMetaType:java.lang.String}, localTransactions=ManagedProperty{localTransactions,localTransactions,metaType=SimpleMetaType:java.lang.Boolean}, validate-on-match=ManagedProperty{validate-on-match,validateOnMatch,metaType=SimpleMetaType:java.lang.Boolean}, connection-url=ManagedProperty{connection-url,connectionUrl,metaType=SimpleMetaType:java.lang.String}, url-delimiter=ManagedProperty{url-delimiter,URLDelimiter,metaType=SimpleMetaType:java.lang.String}, background-validation-minutes=ManagedProperty{background-validation-minutes,backgroundValidationMinutes,metaType=SimpleMetaType:java.lang.Integer}, driver-class=ManagedProperty{driver-class,driverClass,metaType=SimpleMetaType:java.lang.String}, min-pool-size=ManagedProperty{min-pool-size,minSize,metaType=SimpleMetaType:java.lang.Integer}, DBMSMetaData=ManagedProperty{DBMSMetaData,DBMSMetaData,metaType=MutableCompositeMetaType{org.jboss.resource.metadata.mcf.DBMSMetaData items=[name=typeMapping type=java.lang.String]}}, prepared-statement-cache-size=ManagedProperty{prepared-statement-cache-size,preparedStatementCacheSize,metaType=SimpleMetaType:java.lang.Integer}, jmx-invoker-name=ManagedProperty{jmx-invoker-name,jmxInvokerName,metaType=SimpleMetaType:java.lang.String}, noTxSeparatePools=ManagedProperty{noTxSeparatePools,noTxSeparatePools,metaType=SimpleMetaType:java.lang.Boolean}, exception-sorter-class-name=ManagedProperty{exception-sorter-class-name,exceptionSorterClassName,metaType=SimpleMetaType:java.lang.String}, security-domain=ManagedProperty{security-domain,securityMetaData,metaType=GenericMetaType:org.jboss.managed.api.ManagedObject}, max-pool-size=ManagedProperty{max-pool-size,maxSize,metaType=SimpleMetaType:java.lang.Integer}, use-strict-min=ManagedProperty{use-strict-min,useStrictMin,metaType=SimpleMetaType:java.lang.Boolean}, share-prepared-statements=ManagedProperty{share-prepared-statements,sharePreparedStatements,metaType=SimpleMetaType:java.lang.Boolean}, statistics-formatter=ManagedProperty{statistics-formatter,statisticsFormatter,metaType=SimpleMetaType:java.lang.String}, track-connection-by-tx=ManagedProperty{track-connection-by-tx,trackConnectionByTransaction,metaType=SimpleMetaType:java.lang.Boolean}, prefill=ManagedProperty{prefill,prefill,metaType=SimpleMetaType:java.lang.Boolean}, password=ManagedProperty{password,passWord,metaType=SimpleMetaType:java.lang.String}, use-java-context=ManagedProperty{use-java-context,useJavaContext,metaType=SimpleMetaType:java.lang.Boolean}, set-tx-query-timeout=ManagedProperty{set-tx-query-timeout,useQueryTimeout,metaType=SimpleMetaType:java.lang.Boolean}, stale-connection-checker-class-name=ManagedProperty{stale-connection-checker-class-name,staleConnectionCheckerClassName,metaType=SimpleMetaType:java.lang.String}, type-mapping=ManagedProperty{type-mapping,typeMapping,metaType=SimpleMetaType:java.lang.String}, blocking-timeout-millis=ManagedProperty{blocking-timeout-millis,blockingTimeoutMilliSeconds,metaType=SimpleMetaType:java.lang.Long}, config-property=ManagedProperty{config-property,managedConnectionFactoryProperties,metaType=CollectionMetaType{type=java.util.List elementType=GenericMetaType:org.jboss.managed.api.ManagedObject}, connection-definition=ManagedProperty{connection-definition,connectionDefinition,metaType=SimpleMetaType:java.lang.String}, idle-timeout-minutes=ManagedProperty{idle-timeout-minutes,idleTimeoutMinutes,metaType=SimpleMetaType:java.lang.Integer}, isSameRM-override-value=ManagedProperty{isSameRM-override-value,isSameRMOverrideValue,metaType=SimpleMetaType:java.lang.Boolean}, transaction-isolation=ManagedProperty{transaction-isolation,transactionIsolation,metaType=SimpleMetaType:java.lang.String}, background-validation=ManagedProperty{background-validation,backgroundValidation,metaType=SimpleMetaType:java.lang.Boolean}, track-statements=ManagedProperty{track-statements,trackStatements,metaType=SimpleMetaType:java.lang.String}, rar-name=ManagedProperty{rar-name,rarName,metaType=SimpleMetaType:java.lang.String}, user-name=ManagedProperty{user-name,userName,metaType=SimpleMetaType:java.lang.String}, check-valid-connection-sql=ManagedProperty{check-valid-connection-sql,checkValidConnectionSQL,metaType=SimpleMetaType:java.lang.String}, connection-properties=ManagedProperty{connection-properties,dataSourceConnectionProperties,metaType=CollectionMetaType{type=java.util.List elementType=GenericMetaType:org.jboss.managed.api.ManagedObject}, new-connection-sql=ManagedProperty{new-connection-sql,newConnectionSQL,metaType=SimpleMetaType:java.lang.String}, query-timeout=ManagedProperty{query-timeout,queryTimeout,metaType=SimpleMetaType:java.lang.Integer}, url-selector-strategy-class-name=ManagedProperty{url-selector-strategy-class-name,URLSelectorStrategyClassName,metaType=SimpleMetaType:java.lang.String}}
      


      Looking into why this is not a consistent set of properties.


        • 1. Re: DS stats

          We are looking for the following stats, which appear in the first section of ManagedProperties that you posted.

          "Total Connections" property="ConnectionCount"
          "Available Connections" property="AvailableConnectionCount"
          "Active Connections" property="InUseConnectionCount"
          "Connections Created" property="ConnectionCreatedCount"
          "Connections Destroyed" property="ConnectionDestroyedCount"

          I never saw them in the ManagedOperation instance while debugging. So it is interesting that sometimes you see them there through the tests.

          Thanks for letting us know.

          • 2. Re: DS stats
            starksm64

            The problem is somewhere in AbstractManagedObjectFactory as it makes a call to createSkeletonManagedObject for the org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData class, and the resulting ManagedObject is not showing all the properties. Still digging.

            • 3. Re: DS stats
              starksm64

              Ok, I finally tracked this down to the ManagedConnectionFactoryParserDeployer creating duplicate ManagedObjects. It overrides the ManagedObjectCreator.build method, but still calls the super version which also creates ManagedObjects. It looks like this is being done to register the ManagedObject under both its jndi name, and the attachment name. This gets back the naming/template issue Alexey was having, so I'll need to look at that.

              • 4. Re: DS stats
                starksm64

                In the nightly run that should have the changes that got things working in my repo, the testDefaultDSStats still shows as failing:

                org.jboss.test.profileservice.test.ProfileServiceUnitTestCase(profileservice).testDefaultDSStats
                Failing for the past 3 builds (since Unstable#369)
                
                junit.framework.AssertionFailedError: Saw ManagedProperty(ViewUse.STATISTIC)
                 at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testDefaultDSStats(ProfileServiceUnitTestCase.java:375)
                

                I'll look at the test on another box to validate if it should be fixed.

                http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-5.0.x-TestSuite-sun15/371/


                • 5. Re: DS stats
                  dimitris

                  Ok, then I'll wait for the Beta4 tagging.

                  The following goes to CR1?
                  http://jira.jboss.com/jira/browse/JBAS-4396

                  • 6. Re: DS stats
                    starksm64

                    I only see the expected 2 errors, on a different os, vm, so I'm calling bs on the failing tests in hudson for now. Tag beta4. If further issues show up in the console testing I'll address them in the JBAS-4396 patch. JBAS-4396 has been postponed to CR1.

                    • 7. Re: DS stats
                      dimitris

                      Thanks, I just tagged and checked the last testsuite run, which looks good.

                      Onto CR1 !