Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0
-
None
Description
The following code is supposed to work:
MBeanServer mbs = .... // MBeanServerConnection instance
ObjectName on = ... // ObjectName for org.servicemix.jbi.management.ManagementContext (AdminServiceMBean Instance)
AdminServiceMBean asm = (AdminServiceMBean)MBeanServerInvocationHandler.newProxyInstance(mbs,obj,AdminServiceMBean.class,false);
System.out.println(asm.getBindingComponents());
The following exception is thrown:
javax.management.AttributeNotFoundException: Could not locate BindingComponents
at org.servicemix.jbi.management.BaseStandardMBean.getAttribute(BaseStandardMBean.java:170)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.getAttribute(Unknown Source)
Searching through the source code, I discovered that this is caused because the "getBindingComponents" and other "gets" are defined as OperationInfo, rather than AttributeInfo in order to work..