7 Replies Latest reply on Oct 8, 2004 9:22 AM by jivkoto

    MBean dependant of Session Bean deploy HOW?

    jivkoto

      Hi,
      I have MBean which calls periodicly method of sesshion bean. Is there any way to make my mbean dependent of deployment of the session bean? When the mbean tries to call the method, Session bean is not deployed or its jdni name is not registered yet! Or if that dependency is inposible how to make the mbean to "start()" after server final start or deployment of all sar, jar ...etc files?
      10x

        • 1. Re: MBean dependant of Session Bean deploy HOW?
          dimitris

          When a component (ear, ejb jar, war, ..) is deployed entries are created in the jboss.management.local domain,

          e.g. I deployed jboss-media-entity-ejb.jar and I got (among others)

          EJBModule=jboss-media-entity-ejb.jar,J2EEApplication=null,J2EEServer=Local,j2eeType=StatelessSessionBean,name=ejb/media/MediaEntityManager

          So, one way to solve it, it to set a dependency on this MBean that represents a StatelessSessionBean in this case.

          • 2. Re: MBean dependant of Session Bean deploy HOW?
            jivkoto

            Hi again,
            sorry that being persistent but I can't fix it like this. Maybe I make same mistake. If you could help?
            Here is what i write:

            jboss.management.local:EJBModule=Test.jar,J2EEApplication=Test.ear,J2EEServer=Local,j2eeType=StatelessSessionBean,name=ejb/SObserver

            • 3. Re: MBean dependant of Session Bean deploy HOW?
              jivkoto

              Here is it :

              <depends>jboss.management.local:EJBModule=Test.jar,J2EEApplication=Test.ear,J2EEServer=Local,j2eeType=StatelessSessionBean,name=ejb/SObserver</depends>


              • 4. Re: MBean dependant of Session Bean deploy HOW?
                dimitris

                So what's the problem now? Does it complaint or still the dependency doesn't work?

                Can you try to put instead a dependency on the EJB module as a whole, instead of the session bean?

                • 5. Re: MBean dependant of Session Bean deploy HOW?
                  jivkoto

                  Every try is finishing like this:

                  15:40:06,843 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
                  ration 'checkIncompleteDeployments()'
                  Cause: Incomplete Deployment listing:
                  Packages waiting for a deployer:
                   <none>
                  Incompletely deployed packages:
                   <none>
                  MBeans waiting for classes:
                   <none>
                  MBeans waiting for other MBeans:
                  [ObjectName: com.test.jmx:service=Observer
                   state: CONFIGURED
                   I Depend On: com.test.jmx:service=timer
                   jboss.management.local:J2EEApplication=Test.ear,J2EEServer=Local,j2eeTyp
                  e=EJBModule,name=Test.jar


                  • 6. Re: MBean dependant of Session Bean deploy HOW?
                    dimitris

                    It has to do with that particular MBean being in the "Registered" rather than "Started" state.

                    Can you try a difference dependency, like:

                    jboss.j2ee:module=jboss-media-entity-ejb.jar,service=EjbModule

                    Do you see this domain: jboss.j2ee? (or this is on jboss4.0+ only?)

                    • 7. Re: MBean dependant of Session Bean deploy HOW?
                      jivkoto

                      It seems to work now

                      16:16:44,890 INFO [EjbModule] Started jboss.j2ee:module=TestEJB.jar,service=EjbModule
                      16:16:45,171 INFO [Observer] [:startObserverTimer] ObserverTimer with initial d
                      elay 0 and delay 5000 is now started!
                      16:16:45,171 DEBUG [Observer] [:start] -------------------------Just started!---
                      ------------------
                      

                      My MBean starts after module is started.
                      Thank you very much for the help.

                      P.S. I will see if I could make the dependence up to the session bean anyway :)