[jboss-dev-forums] [Design of JBoss Deployment Framework] - Re: MBean Dependency not working as expected .

adrian@jboss.org do-not-reply at jboss.com
Wed Aug 6 07:58:01 EDT 2008


"vickyk" wrote : I have the following contents in the MBean deployment descriptor 
  | 
  | 
  |   | <?xml version="1.0" encoding="UTF-8"?>
  |   | <server>
  |   |   <mbean code="org.jboss.test.jca.mbean.RaDependsOnMe"
  |   |          name="jboss.test:test=RaDependsOnMeMBean">
  |   | <depends>jboss.test:name=test</depends>
  |   | 	</mbean>
  |   | </server>
  | 
  | The jboss.test:name=test is not present so I would expect that the RaDependsOnMe not to get registered/available for usage 
  | 
  | But to my surprise I see the MBean jboss.test:test=RaDependsOnMeMBean available from the jmx-console and I am able to call the sayHello() operation from the jmx-console .
  | 
  | I tried this on Jboss5 , Jboss4.2 and Jboss4.0.5 .
  | 
  | This looks to me as the bug .
  | 
  | 

No. Depends is a contract on the create/start lifecycle not registration in the
MBeanServer. To get what you want in JMX, you'd have to introduce
something like the MC demand into the jmx xml.

  |   <mbean code="org.jboss.test.jca.mbean.RaDependsOnMe"
  |          name="jboss.test:test=RaDependsOnMeMBean">
  | <demand whenRequired="Instantiated">jboss.test:name=test</demand>
  | 	</mbean>
  | 
Which doesn't currently exist within the -service.xml


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

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



More information about the jboss-dev-forums mailing list