[jboss-dev-forums] [JBoss AS7 Development] - Re: JMX-based monitoring the jbossAS7 database connection pool
duan xz
do-not-reply at jboss.com
Mon Oct 10 06:22:45 EDT 2011
duan xz [http://community.jboss.org/people/duanxz] created the discussion
"Re: JMX-based monitoring the jbossAS7 database connection pool"
To view the discussion, visit: http://community.jboss.org/message/630851#630851
--------------------------------------------------------------
Hi Braun,
Thanks for Response.
but two things is not really clear to me.
1、In order to retrieve the datasource information,
To parse the standalone.xml located in jboss-as-web-7.0.2.Final\standalone\configuration file system to get data source information?
in standalone.xml Contains the following information:
================================================================================================
<datasource jndi-name="abc" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
</connection-url>
<driver>
h2
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
sa
</user-name>
<password>
sa
</password>
</security>
</datasource>
================================================================================================
2、use “Detyped Description of the AS 7 Management Model" to retrieve the datasource information.
like this:
==================================
ModelNode op = new ModelNode();
op.get("operation").set("read-resource-description");
op.get("recursive").set(true);
op.get("operations").set(true);
ModelNode address = op.get("address");
address.add("subsystem", "web");
address.add("connector", "http");
==================================
if i want to get all like "<datasource jndi-name =" abc "pool-name =..." node data source name, how to modify the code?
Could you please help me ?
Thanks a lot,
duanxz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630851#630851]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111010/d420fecf/attachment.html
More information about the jboss-dev-forums
mailing list