Sarah,
You are trying to get child MBeans of DomainRoot which don't exist; it
is not a flat namespace, it is a hierarchy, and DomainRoot is the top
level of the AMX hierarchy.
Please see the javadoc:
https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/index.html
Map<String,ThreadPoolMonitor> tpms =
domainRoot
.getMonitoringRoot
().getServerRootMonitorMap().get(serverName).getThreadPoolMonitorMap();
for( ThreadPoolMonitor m : tpms ) {
...
}
You can also query for all ThreadPoolMonitor in all servers using:
Set<ThreadPoolMonitor> tpms =
domainRoot.getQueryMgr().queryJ2EETypeSet(XTypes.THREAD_POOL_MONITOR);
for( ThreadPoolMonitor m : tpms ) {
...
}
Lloyd
On Dec 14, 2008, at 4:38 AM, sarah.kho wrote:
>
> Hi
> Thank you for reading my post.
> i am trying to get monitoring information for one of my thread pools
> in the
> glassfish v2.
> i can see the monitoring information in the jconsole but when i try
> to get
> the same information in java code, it looks like that glassfish does
> not
> return the information
> here is my code
>
>
> Set<AMX> st = domainroot.getContaineeSet(XTypes.THREAD_POOL_MONITOR);
>
> the set is always empty without any item inside it. is there any
> trick in
> it?
>
> --
> View this message in context: http://www.nabble.com/I-can-not-get-monitoring-MBeans-using-AMX-in-glassfish-v2-tp20999929p20999929.html
> Sent from the java.net - glassfish dev mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>