-
1. Re: wildfly 9.0.0.CR1 datasource metrics problem
jaysensharma May 12, 2015 9:57 PM (in response to sertan0176)Did you try enabling the "statistics-enabled" attribute of the datasource first ? (by default it is disabled)
Examples:
/subsystem=datasources/data-source=MySqlDS:add(jndi-name=java:/MySqlDS,enabled=true,connection-url="jdbc:mysql://localhost:3306/testDB",driver-name=mysql-connector-java-5.1.13-bin.jar,user-name=root,password=mytest123) [standalone@localhost:9990 /] /subsystem=datasources/data-source=MySqlDS:write-attribute(name=statistics-enabled,value=true) [standalone@localhost:9990 /] :reload
Access the application:
[standalone@localhost:9990 /] /subsystem=datasources/data-source=MySqlDS/statistics=pool:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"ActiveCount" => 1,
"AvailableCount" => 19,
"AverageBlockingTime" => 0L,
"AverageCreationTime" => 274L,
"AverageGetTime" => 274L,
"AveragePoolTime" => 0L,
"AverageUsageTime" => 0L,
"BlockingFailureCount" => 0,
"CreatedCount" => 1,
"DestroyedCount" => 0,
"IdleCount" => 0,
"InUseCount" => 1,
"MaxCreationTime" => 274L,
"MaxGetTime" => 274L,
"MaxPoolTime" => 0L,
"MaxUsageTime" => 0L,
"MaxUsedCount" => 1,
"MaxWaitCount" => 0,
"MaxWaitTime" => 0L,
"TimedOut" => 0,
"TotalBlockingTime" => 0L,
"TotalCreationTime" => 274L,
"TotalGetTime" => 274L,
"TotalPoolTime" => 0L,
"TotalUsageTime" => 0L,
"WaitCount" => 0,
"XACommitAverageTime" => 0L,
"XACommitCount" => 0L,
"XACommitMaxTime" => 0L,
"XACommitTotalTime" => 0L,
"XAEndAverageTime" => 0L,
"XAEndCount" => 0L,
"XAEndMaxTime" => 0L,
"XAEndTotalTime" => 0L,
"XAForgetAverageTime" => 0L,
"XAForgetCount" => 0L,
"XAForgetMaxTime" => 0L,
"XAForgetTotalTime" => 0L,
"XAPrepareAverageTime" => 0L,
"XAPrepareCount" => 0L,
"XAPrepareMaxTime" => 0L,
"XAPrepareTotalTime" => 0L,
"XARecoverAverageTime" => 0L,
"XARecoverCount" => 0L,
"XARecoverMaxTime" => 0L,
"XARecoverTotalTime" => 0L,
"XARollbackAverageTime" => 0L,
"XARollbackCount" => 0L,
"XARollbackMaxTime" => 0L,
"XARollbackTotalTime" => 0L,
"XAStartAverageTime" => 0L,
"XAStartCount" => 0L,
"XAStartMaxTime" => 0L,
"XAStartTotalTime" => 0L,
"statistics-enabled" => true
}
}
-
2. Re: wildfly 9.0.0.CR1 datasource metrics problem
sertan0176 May 14, 2015 7:00 AM (in response to jaysensharma)thank you.it worked.