0 Replies Latest reply on Sep 21, 2005 4:10 AM by ccsaxton

    depends

    ccsaxton Newbie

      I have 2 sar files and I want to make one bean in one file depend on another bean in another sar file...I thought that I could just easily use the depends tag but a dependant bean is being deployed too early...here are the jboss-service.xml contents for each...remember that they both exist in seperate sars (is that okay?)

      ---first file ----

      <server>
       <mbean code="com.embsoft.service.EmbraceServiceJBoss"
       name="embsoft:service=serviceregistry">
      ....
       </mbean>
      </server>
      


      ----second file-----
      <server>
       <mbean code="com.embsoft.jts.jboss.JtsJBoss"
       name="embsoft:service=jts">
      
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=TransactionManager</depends>
       <depends>embsoft:service=serviceregistry</depends>
      
       </mbean>
      </server>
      



      The problem is that the second sar file (Jts) is being run before the first (EmbraceService...). If I start jboss and drop the first sar into the deploy area then it deploys fine as I would expect...I then drop the second (Jts) into the deploy area and it starts fine...its just if they both exist in the deploy area at server startup then they are started in the wrong order...its almost like the depends tag is being completely ignored??

      This is on jboss-4.0.2 and I am using the ServiceMBean interface with the ServiceMBeanSupport class...(like in the HelloWorld service example!)

      I am obviously missing something here?!?