Oops, my instructions were not completely correct.  The correct data source 
name is DefaultDS, not ds/DefaultDS.

The easiest way to find out the name of the mbean you are looking for it to use 
the jmx-console:  http://localhost:8080/jmx-console.  Then you simple replace 
the object name text with the mbean name you want.

As for the three lines of code you asked about:

ObjectName name .... converts the string representation of the mbean name into 
an object.  An mbean name consists of a namespace (jboss.jca), followed by a 
colon, and then followed by a comma-separated lists of name/value pairs that 
can appear in any order.  What the name/value pairs are and mean depends on the 
writer of the mbean.

Object val .... get the value of an attribute (InUseConnectionCount) from the 
mbean.

System.out. .... of course prints out the mbean name and the value of the 
attribute.

The code I provided works in a stand-alone client and can access a remote JBoss 
server instance, just change "localhost" in the url to the desired host name.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953022#3953022

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953022

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to