1 2 Previous Next 24 Replies Latest reply on Apr 29, 2004 10:35 AM by hoos Go to original post
      • 15. Re: Deploy Order - how?
        hoos

        Here's my server log file with debug switched on:


        03:16:09,225 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301
        45)] Started in 12s:668ms
        03:16:24,207 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.3/server/defau
        t/deploy/sessionjmxmanager.sar
        03:16:24,207 DEBUG [MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-3.2
        3/server/default/deploy/sessionjmxmanager.sar
        03:16:24,207 DEBUG [MainDeployer] using deployer org.jboss.deployment.SARDeployer@12d263f
        03:16:24,207 DEBUG [SARDeployer] about to copy 0 local directories
        03:16:24,207 DEBUG [SARDeployer] looking for nested deployments in : file:/C:/jboss-3.2.3/server/de
        ault/deploy/sessionjmxmanager.sar
        03:16:24,217 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[sourc
        =jboss.system:service=ServiceDeployer,type=org.jboss.deployment.SubDeployer.init,sequenceNumber=87,
        imeStamp=1083032184217,message=null,userData=org.jboss.deployment.DeploymentInfo@bb32da1f { url=fil
        :/C:/jboss-3.2.3/server/default/deploy/sessionjmxmanager.sar }
        deployer: org.jboss.deployment.SARDeployer@12d263f
        status: null
        state: INIT_DEPLOYER
        watch: file:/C:/jboss-3.2.3/server/default/deploy/sessionjmxmanager.sar
        lastDeployed: 0
        lastModified: 0
        mbeans:
        ]
        03:16:24,217 DEBUG [DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repo
        itoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, confi
        ParserClassName: null, repositoryConfig: null)
        03:16:24,217 DEBUG [UnifiedClassLoader] New jmx UCL with url file:/C:/jboss-3.2.3/server/default/tm
        /deploy/tmp24604sessionjmxmanager.sar



        I noteiced other mbeans clearly state their dependcies e.g.



        Depends On Me: jboss.mq:service=Invoker
        ObjectName: jboss.mq:service=SecurityManager
        state: CONFIGURED
        I Depend On: jboss.mq:service=DestinationManager



        So it does look like my dependncies are not being picked up :(

        • 16. Re: Deploy Order - how?
          raja05

          Could be a silly try but can you swap the order of module and service in the depends clause. Its different in the jmx-console against the one in ur .xml file. The module and service are swapped. Im not sure if it makes a difference, but maybe worth a try!!

          • 17. Re: Deploy Order - how?
            hoos

            Raja,

            At this point nothing is too silly to try! Alas I tried it with no luck.

            Is it possible to tell jboss to deploy from another directory, AFTER the deploy directory (this would make for a workaround). I managed to get jboss to scan anoher directory but it seems to still deploy any sars found in other directories first (damn foiled again).

            By the way I am now willing to cough up £50 for solution to this, not much I know but just as a token gesture!

            Help me!

            • 18. Re: Deploy Order - how?
              hoos

              Ok, I have a work around using the PrefixDeploymentSorter.

              I seperated my jmx bean and placed it in a different deploy dir (2deploy)

              From the jboss logfiles I can see everything being deployed from the deploy dir incluing my EAR file. Then the contents of 2deploy are deployed.

              Very cluncky but at least i can get on with some work now. If anyone manages to get a better solution working please tell me. I guess what would be nice is if the depends tags worked, may do, just not for me and my miserable complex deployment :(

              I will certainly get back to this when i get some extra time to see whats going on.

              I will also try naimg my mbean as mbean.sar.last to see if this works.





              • 19. Re: Deploy Order - how?
                jae77

                try this:

                <service>
                
                 <mbean code="com.xensia.jmx.SessionManager"
                 name="xensia.jmx:name=SessionManagerMBean">
                <depends>jboss.j2ee:service=EJB,jndiName=ejb/SystemSettingBean</depends>
                <depends>jboss.j2ee:service=EJB,jndiName=ejb/SessionManagerBean</depends>
                 </mbean>
                
                </service>
                


                as your jboss-service.xml file. this should work w/o issue. the rest of jboss uses dependencies like this and deploys w/o issue. i am not sure if you can depend on a "jar" like that.

                also, what do the contents of your application.xml and jboss-app.xml file look like?

                • 20. Re: Deploy Order - how?

                  I am coming into this late...but how do you add the using xdoclets?

                  • 21. Re: Deploy Order - how?
                    jae77

                     

                    "brokenjacko" wrote:
                    I am coming into this late...but how do you add the <depends></depends> using xdoclets?


                    i can't find anything for this on the xdoclet site, so i'm going to guess that it needs to be done w/ a merge file (i'm still relatively new to xdoclet).

                    • 22. Re: Deploy Order - how?

                       

                      "jae77" wrote:
                      "brokenjacko" wrote:
                      I am coming into this late...but how do you add the <depends></depends> using xdoclets?


                      i can't find anything for this on the xdoclet site, so i'm going to guess that it needs to be done w/ a merge file (i'm still relatively new to xdoclet).


                      It's available on the xdoclet CVS (HEAD).

                      @jboss.depends name="ObjectName" at class level.

                      You need either to build jboss module from CVS, or wait the Xdoclet 1.2.1 release (which will be out soon according to the dev list).

                      Regards,

                      Stephane

                      • 23. Re: Deploy Order - how?
                        jae77

                        cool - thx for that update!!

                        • 24. Re: Deploy Order - how?
                          hoos

                          Hello jae,

                          I tried your suggestion for the jboss-service.xml file but I got exactly the
                          same error as before.

                          I also tried declaring a new dependency on a timer service

                          <service>
                          <mbean code="com.xensia.jmx.SessionManager"
                           name="xensia.jmx:name=SessionManagerMBean">
                          
                           <depends>DefaultDomain:service=timer</depends>
                           <depends>jboss.j2ee:service=EJB,jndiName=ejb/SystemSettingBean</depends>
                           <depends>jboss.j2ee:service=EJB,jndiName=ejb/SessionManagerBean</depends>
                           </mbean>
                          </service>
                          
                          



                          My jboss-app.xml

                          jboss-app>
                           <module>
                           <service>sessionjmxmanager.sar</service>
                           </module>
                          </jboss-app>
                          


                          The sessionjmxmanager is currently my only MBean

                          My application.xml file is somewhat larger by simply consists of EJB and WEBAPP modules

                          <application>
                           <display-name>XIBMS</display-name>
                          
                           <module>
                           <ejb>systemsetting.jar</ejb>
                           </module>
                          
                           <module>
                           <ejb>sessionmanager.jar</ejb>
                           </module>
                          
                          ...loads more modules
                          


                          I also tried changing the file extension of the sar file to .sar.last

                          my logs indicate


                          15:41:51,388 INFO [MainDeployer] deployment waiting for deployer: file:/C:/jboss-3.2.3/server/defau
                          lt/deploy/xibms.ear/sessionjmxmanager.sar.last


                          before jboss starts to deploy my ejbs which is promising but my mbean fails to deploy.

                          I accept that the depends tags work for most deployments, thats clear from many other posts (although I am am bit confused about the number of different ways one can declare the dependencies), however I just don't think they work when in my case i.e. Explded EAR file wih MBean dependent on multiple EJBs. It seems I am forced to put my Mbeans in a seperate directory and deploy after my EAR file using the prefix deployer.

                          Has anyone actually got this working in the configuration described above?

                          Cheers,
                          Hoos

                          1 2 Previous Next