|
Quick Lists
|
|
Bug ID:
|
5035217
|
|
Votes
|
0
|
|
Synopsis
|
Dynamic MBeans wrap RuntimeException in RuntimeOperationsException
|
|
Category
|
jmx:classes
|
|
Reported Against
|
tiger-beta2
|
|
Release Fixed
|
1.5(tiger-b54)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
5045091
,
5043152
,
5035038
,
5058319
|
|
Submit Date
|
21-APR-2004
|
|
Description
|
When the getAttribute, setAttribute, or invoke of a Dynamic MBean throws a RuntimeException, this is wrapped by the MBean Server in a RuntimeOperationsException. But for Standard MBeans, it is wrapped in a RuntimeMBeanException. This inconsistency is clearly wrong. Although the spec is somewhat unclear in this area, it certainly seems that wrapping in RuntimeMBeanException is the correct behaviour.
|
|
Work Around
|
N/A
|
|
Evaluation
|
In fact, we have three distinct behaviours:
- A Standard MBean's RuntimeException is wrapped in a RuntimeMBeanException.
- A user Dynamic MBean's RuntimeException is wrapped in a RuntimeOperationsException.
- An instance of StandardMBean's RuntimeException is wrapped in a RuntimeMBeanException which is itself wrapped in a RuntimeOperationsException.
Plainly this should be untangled.
xxxxx@xxxxx 2004-04-21
The spec is not 100% clear on the exact meaning of RuntimeOperationsException. Clearly it is appropriate to throw it when e.g. the ObjectName parameter to MBeanServer.invoke is null. Reading the text on RuntimeOperationsException alone (e.g. on p119) might lead to the conclusion that it should also be thrown when a getAttribute or invoke on an MBean throws IllegalArgumentException, IndexOutofBoundsException, or NullPointerException. However, that's not the behaviour implemented for any kind of MBean. And the spec for RuntimeMBeanException *is* clear that this is the exception to throw when an MBean throws a RuntimeException. So Dynamic MBeans and the StandardMBean class should be corrected to behave that way, consistent with Standard MBeans.
xxxxx@xxxxx 2004-05-03
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |