質問

I am trying to get a JMX MBean operation to return something other than "Method successfully invoked", from JConsole. When an exception occurs in the invoked method, I would like to see "Method failed" from JConsole, rather than "Method successfully invoked". Is there anything I can do in my MBean to make this happen?

役に立ちましたか?

解決

JMXConsole, to my knowledge, will not report the method successfully invoked, unless it was. It sounds like the exception is being trapped in your target JMX invoked method, or somewhere in the path of execution of that method. Make sure you allow your exceptions to bubble up and eventually, the JMX layer will pick an exception type to wrap it in, usually javax.management.MBeanException if it was a generic exception.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top