简体   繁体   中英

JMX MBeans not visible after deploy

ENVIRONMENT NetBeans 6.9.1, GlassFish 3.1, METRO 2.1

I want to make a list of available web services, so I'm querying JMX MBeanServer for *:type=WSEndpoint,* . The problem is, there are only ~56 Mbeans after deploy, and WSEndpoint beans are not registered. If I connect with JMXterm, the MBean count jumps up to ~380, and all WSEndpoint beans are visible. From JConsole, I don't see any folder , but after running JMXterm I do.

Even if I call the web service, the MBeans stay unregistered. METRO monitoring is enabled by default, and I left it like that; after deploy a console message INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=... is shown.

What does JMXterm do so that all MBeans are visible? Does it do any method calls to MBeanServer ? Is there any solution, so that I can access WSEndpoint beans right after deploy?

您可以通过在MBean amx-support:type=boot-amx上执行JMX操作bootAMX来触发所有AMX MBean的注册。

Meanwhile, I've found the answer in METRO Users Guide: 19.5. Notes .

The AMX mbean is created lazily. Therefore, if one deploys an endpoint in GlassFish and then looks for the Metro WSEndpoint mbeans using JConsole there are times where the AMX mbean does not appear. To activate it start up the asadmin GUI or CLI. Or use jmxterm and issue its domains command.

In some cases Metro endpoint mbeans will not appear until the endpoint receives its first client invocation.

WSClient mbeans can appear and disappear quickly if the stub is just used for one call then closed immediately. A stub that uses reliable messaging or secure conversation generally stays active longer since it will most likely be used for multiple calls.

However, after running the asadmin GUI or CLI did not help, I could only solve it by connecting to the JVM with JMXterm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM