Ok, so first of all, we need a test for this in system-jmx.
The only test for cross injection just uses the object, it does not test
accessing a "property" of an MBean.
org.jboss.test.system.controller.integration.test.ConfigureMCFromJMXTestCase-mc.xml
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <bean name="Test"
class="org.jboss.test.system.controller.integration.support.SimpleBean">
| <property name="simple"><inject
bean="jboss.test:type=test"/></property>
| </bean>
| </deployment>
|
Previously, this just treated the MBean like a javabean
(i.e. the property name was port)
looking directly at the MBean object.
But now it has been changed to go through the JMX api
(so it needs to use the JMX attribute name Port).
Alternatively, we could do as Scott says and try both in ServiceControllerContext
| public Object get(String name) throws Throwable
| {
| try
| {
| return getMBeanServer().getAttribute(objectName, name);
| }
| catch (AttributeNotFoundException orignal)
| {
| try
| {
| name = switchToUpperOrLowerCase(name);
| return getMBeanServer().getAttribute(objectName, name);
| }
| catch (AttributeNotFoundException e)
| {
| throw original;
| }
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005232#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...