[jboss-user] [Microcontainer] - Re: migrating from ServiceMBeanSupport

jhalliday do-not-reply at jboss.com
Wed Nov 28 04:23:14 EST 2007


Thanks Ales

For the MBeanServer, I've opted to try injecting. That should work, but I can't figure out the correct xml.

<mbean name="jboss:service=TransactionManager"
  |  code="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
  |          <constructor>
  |                  <parameter type="javax.management.MBeanServer">
  |                    <inject bean="JMXKernel" property="mbeanServer"/></parameter>

does not work, the parameter elements are not seen. Scott suggested

<arg type="javax.management.MBeanServer"><inject
  | bean="JMXKernel" property="mbeanServer"/></arg>

instead, which does not work either ("Missing 'value' attribute in constructor arg").  That leaves me stuck, as I can't figure out the syntax for injecting to an attribute in the xml. 


For the notifications, there does not appear any way to specify what I want in xml. I'll either have to split my bean into two or link it against the event listener code.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108335#4108335

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108335



More information about the jboss-user mailing list