Throwing appropriate exceptions and message for Spring JMX Beans

427 views Asked by At

I have a MBean that throws a runtime exception to the effect

Error during MBean operation invocationMessage: RuntimeException thrown in RequiredModelMBean while trying to invoke operation someMethod

Is there a way I can coax the exception to display a more informative message to the JMX MBean Management Console

1

There are 1 answers

3
Gary Russell On

Which console?

In both VisualVM and JConsole, I get

Problem invoking fooBar: java.lang.RuntimeException: foo

where foo is the exception's message property.