5 Replies Latest reply on Nov 24, 2009 10:28 AM by sverker

    Mbean depends on deployment of EJB3 jar?

    sverker

      Hi
      I have a mbean that is deployed with a *-service.xml file. The issue I see is that it has to be dependant on an EJB3 jar. I.e. it can't start until the ejb3 jar is deployed and it must stop before it is undeployed.

      I was able to make that work in JBoss 4.2, but not in JBoss 5.1. I can set a dependency on an EJB2 jar in the same ear and that works, but not on the EJB3. The *-service.xml file is in the same .ear as the others.

      My dependency look like this (I've tried other variants as well, it wasn' the same in JBoss 4.2):

      <depends>jboss.j2ee:ear=LimeSms-1.2-SNAPSHOT.ear,jar=ejb3-limesms-1.2-SNAPSHOT.jar,service=EJB3</depends>


      and I can see this exact name in the jmx-console. I've tried other variants as well.

      The dependency on ejb2 jar looks like this, and it works:
      <depends>jboss.j2ee:module="ejb2-limesms-1.2-SNAPSHOT.jar",service=EjbModule</depends>


        • 1. Re: Mbean depends on deployment of EJB3 jar?
          jaikiran

          What happens? You see any errors or is that entry being ignored completely? Can you post the console logs of your deployment and any relevant stacktrace?

          • 2. Re: Mbean depends on deployment of EJB3 jar?
            sverker

            Hi
            This is the error message I get:

            13:43:08,456 WARN [HDScanner] Failed to process changes
            org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            
            DEPLOYMENTS MISSING DEPENDENCIES:
             Deployment "com.limetransit.sms:service=LimeManagement" is missing the following dependencies:
             Dependency "jboss.j2ee:ear=LimeSms-1.2-SNAPSHOT.ear,jar=ejb3-limesms-1.2-SNAPSHOT.jar,service=EJB3" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.j2ee:ear=LimeSms-1.2-SNAPSHOT.ear,jar=ejb3-limesms-1.2-SNAPSHOT.jar,service=EJB3' **")
            
            DEPLOYMENTS IN ERROR:
             Deployment "jboss.j2ee:ear=LimeSms-1.2-SNAPSHOT.ear,jar=ejb3-limesms-1.2-SNAPSHOT.jar,service=EJB3" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:ear=LimeSms-1.2-SNAPSHOT.ear,jar=ejb3-limesms-1.2-SNAPSHOT.jar,service=EJB3' **
            
             at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
             at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
             at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
             at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
             at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
             at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
             at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
             at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
             at java.lang.Thread.run(Thread.java:619)
            


            • 3. Re: Mbean depends on deployment of EJB3 jar?
              sverker

              It seem to work if I set the dependency on a specific service, but not on the whole module.

              • 4. Re: Mbean depends on deployment of EJB3 jar?
                jaikiran

                 

                "sverker" wrote:
                It seem to work if I set the dependency on a specific service, but not on the whole module.


                Ah yes, i overlooked the dependency string. You should be adding dependency on the specific bean instead of the whole jar/ear.

                • 5. Re: Mbean depends on deployment of EJB3 jar?
                  sverker

                  That has worked before, and works still with EJB2. Is the problem that the module doesn't become availible in jmx until all has deployed, because then that name do exsist?