0 Replies Latest reply on Oct 15, 2008 8:24 PM by starksm64

    mbean service depends addition

    starksm64

      One addition I had to make to allow the pojoized naming beans to still be correctly used as mbeans was to add an 'attribute' attribute to the mbean depends element. Its similar to the mcbean inject property attribute:

      <server>
      ...
       <!-- A custom deployment of the JBoss JNDI naming service -->
       <mbean code="org.jnp.server.Main"
       name="jboss.test:service=Naming,test=pooled-main"
       xmbean-dd="resource:xmdesc/Main-xmbean.xml">
       <!-- The bootstrap port used to lookup the Naming proxy -->
       <attribute name="Port">10999</attribute>
       <!-- Don't override the default naming service -->
       <attribute name="InstallGlobalService">false</attribute>
       <attribute name="Naming"><inject bean="LocalNamingBean"/></attribute>
       <!-- The detached pooled invoker proxy -->
       <depends optional-attribute-name="NamingProxy"
       attribute="Proxy">jboss.test:service=proxyFactory,type=pooled,target=Naming</depends>
       </mbean>
      


      This injects the Proxy attribute from the 'jboss.test:service=proxyFactory,type=pooled,target=Naming' mbean into the NamingProxy attribute of the dependent bean.