[
https://issues.jboss.org/browse/WFLY-2551?page=com.atlassian.jira.plugin....
]
Brian Stansberry edited comment on WFLY-2551 at 7/28/14 5:26 PM:
-----------------------------------------------------------------
I've figured out how to reproduce this and what the underlying issue is. The latter is
complex, so first I'll post how to reproduce:
1) Start the system running the standard standalone.xml. Connect jconsole, go to mbeans
tab, navigate to jboss.as->datasources->ExampleDS, you'll see "jdbc"
and "pool" children.
2) Get the system such that the subsystem has loaded with the datasource disabled. You
could edit xml, but here I'll use the CLI against a server started from a standard
standalone.xml
{code}
[standalone@localhost:9990 /] cd subsystem=datasources/data-source=ExampleDS
[standalone@localhost:9990 data-source=ExampleDS] :disable
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
[standalone@localhost:9990 data-source=ExampleDS] reload
{code}
3) Change an attribute on the datasource resource. I don't think it much matters which
one; check-valid-connection-sql is just the one the reporter was changing:
{code}
[standalone@localhost:9990 data-source=ExampleDS]
:write-attribute(name=check-valid-connection-sql,value="select 1")
{"outcome" => "success"}
{code}
4) Enable the datasource
{code}
[standalone@localhost:9990 data-source=ExampleDS] :enable
{"outcome" => "success"}
{code}
5) Close the jconsole connection and reconnect (which refreshes the mbean tree). Under
jboss.as->datasources->ExampleDS, you no longer see "jdbc" and
"pool" children.
6) Some CLI operations won't work also
{code}
[standalone@localhost:9990 data-source=ExampleDS] cd statistics=jdbc
WFLYCTL0217: Child resource '"statistics" => "jdbc"' not
found
[standalone@localhost:9990 data-source=ExampleDS] cd statistics=pool
WFLYCTL0217: Child resource '"statistics" => "pool"' not
found
{code}
7) Interestingly, many CLI operations still work, e.g.:
{code}
[standalone@localhost:9990 data-source=ExampleDS]
./statistics=jdbc:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"PreparedStatementCacheAccessCount" => "0",
"PreparedStatementCacheAddCount" => "0",
"PreparedStatementCacheCurrentSize" => "0",
"PreparedStatementCacheDeleteCount" => "0",
"PreparedStatementCacheHitCount" => "0",
"PreparedStatementCacheMissCount" => "0",
"statistics-enabled" => false
}
}
{code}
The reason for this is just that the handler for "read-resource" happens to be
forgiving of the underlying problem, which I'll get to next.
was (Author: brian.stansberry):
I've figured out how to reproduce this and what the underlying issue is. The latter is
complex, so first I'll post how to reproduce:
1) Start the system running the standard standalone.xml. Connect jconsole, go to mbeans
tab, navigate to jboss.as->datasources->ExampleDS, you'll see "jdbc"
and "pool" children.
2) Get the system such that the subsystem has loaded with the datasource disabled. You
could edit xml, but here I'll use the CLI against a server started from a standard
standalone.xml
{code}
[standalone@localhost:9990 /] cd subsystem=datasources/data-source=ExampleDS
[standalone@localhost:9990 data-source=ExampleDS] :disable
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
[standalone@localhost:9990 data-source=ExampleDS] reload
{code}
2) Change an attribute on the datasource resource. I don't think it much matters which
one; check-valid-connection-sql is just the one the reporter was changing:
{code}
[standalone@localhost:9990 data-source=ExampleDS]
:write-attribute(name=check-valid-connection-sql,value="select 1")
{"outcome" => "success"}
{code}
3) Enable the datasource
{code}
[standalone@localhost:9990 data-source=ExampleDS] :enable
{"outcome" => "success"}
{code}
4) Close the jconsole connection and reconnect (which refreshes the mbean tree). Under
jboss.as->datasources->ExampleDS, you no longer see "jdbc" and
"pool" children.
5) Some CLI operations won't work also
{code}
[standalone@localhost:9990 data-source=ExampleDS] cd statistics=jdbc
WFLYCTL0217: Child resource '"statistics" => "jdbc"' not
found
[standalone@localhost:9990 data-source=ExampleDS] cd statistics=pool
WFLYCTL0217: Child resource '"statistics" => "pool"' not
found
{code}
6) Interestingly, many CLI operations still work, e.g.:
{code}
[standalone@localhost:9990 data-source=ExampleDS]
./statistics=jdbc:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"PreparedStatementCacheAccessCount" => "0",
"PreparedStatementCacheAddCount" => "0",
"PreparedStatementCacheCurrentSize" => "0",
"PreparedStatementCacheDeleteCount" => "0",
"PreparedStatementCacheHitCount" => "0",
"PreparedStatementCacheMissCount" => "0",
"statistics-enabled" => false
}
}
{code}
The reason for this is just that the handler for "read-resource" happens to be
forgiving of the underlying problem, which I'll get to next.
AS7.2 - JMX Datasource pool & jdbc statistics dissapear if you
enable validation
--------------------------------------------------------------------------------
Key: WFLY-2551
URL:
https://issues.jboss.org/browse/WFLY-2551
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA, JMX
Reporter: Will Tatam
Assignee: Stefano Maestri
If you just create a basic datasource under AS 7.2 the you can view the current
statistics about the pool under
jboss.as:subsystem=datasources,data-source=mySQL,statistics=pool
However, if you add the following then sometimes the statistics=pool and statistics=jdbc
entries disspaear
<validation><check-valid-connection-sql>select
1</check-valid-connection-sql></validation>
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)