0 Replies Latest reply on Jun 22, 2004 11:17 AM by gchazalon

    Custom MBean lifecycle with EJB dependencies

    gchazalon

      Hi,

      I have experienced a strange behavior using JBoss 3.2.3 JMX.

      I have created a custom MBean, which basicaly creates an instance of a stateful EJB and map it into a JNDI entry.
      Since my MBean depends on the deployment of this particular EJB, I have a element in the associated jboss-service.xml.

      Here it is :

      <server>
       <mbean code="adonis2.adp.archivage.depot.admin.EPRManager" name="adonis2.adp.archivage.depot.admin:service=EPRManager">
      <depends>jboss.j2ee:service=EJB,jndiName=adonis2.adp.archivage.depot.EPRHolderLocalHome</depends>
       </mbean>
      </server>
      


      For JUnit testing purpose, I have to generate both types of interfaces for this EJB (i.e. I have a Home, LocalHome, Local and Remote interface for that EJBean).

      So, the probem is, if I set the dependency on the deployment of the LocaHome, the start() and stop() method are simply never called !
      But if I set it on the deployment of the Home, it works !!!
      How strange, ain't it ?

      So my question is :
      Is this something normal that JBoss only notifies depending MBean for the deployment of a Home, and not for a deployment of a LocalHome ?


      Gregory