2 Replies Latest reply on Mar 19, 2009 11:00 AM by hifi

    Dependency from EAR problem

    hifi

      Hi, I have the following problem when migrated from 4.2.2 to 5.0.1

      Because of dependency reasons I put a @Depends annotation to a MDB.
      The MDB is in myear.ear application archive and all was working grat - it was started (mdb) at the end when the whole application is deployed.
      Here is the annotaion:

      @Depends("jboss.j2ee:service=EARDeployment,url='myear.ear'")


      Now with JBoss AS 5 it is not working, there is no such JMX object in the console. I have tried several other options as

      jboss.j2ee:ear=myear.ear,jar=myjar.jar,service=EJB3
      jboss.management.local:J2EEApplication=myear.ear,J2EEServer=Local,j2eeType=EJBModule,name=myjar.jar

      and so on but the result is the same - doesn't work.
      At the end the server prints

      DEPLOYMENTS MISSING DEPENDENCIES:
       Deployment "jboss.j2ee:ear=myear.ear,jar=myjar.jar,name=Job,service=EJB3" is missing the following dependencies:
       Dependency "<UNKNOWN jboss.j2ee:ear=myear.ear,jar=myjar.jar,name=Job,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.j2ee:ear=myear.ear,jar=myjar.jar,service=EJB3' **")
      
      DEPLOYMENTS IN ERROR:
       Deployment "<UNKNOWN jboss.j2ee:ear=myear.ear,jar=myjar.jar,name=Job,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.j2ee:ear=myear.ear,jar=myjar.jar,service=EJB3' **
      


      Any help or ideas how to make it work with JBoss5?

        • 1. Re: Dependency from EAR problem
          jaikiran

           

          "hifi" wrote:

          Because of dependency reasons I put a @Depends annotation to a MDB.
          The MDB is in myear.ear application archive and all was working grat - it was started (mdb) at the end when the whole application is deployed.
          Here is the annotaion:

          @Depends("jboss.j2ee:service=EARDeployment,url='myear.ear'")




          I don't think depending on a EARDeployment is available in AS5. What exactly does the MDB depend on in that EAR?

          • 2. Re: Dependency from EAR problem
            hifi

            It's a Seam MDB which is activated before the Seam context.

            The situation is:

            If while starting the server there are some undelivered messages in the JMS queue they are sent immediately. The server passes them to the MDB, but it is a Seam component and Seam is not initialized yet -> Exception. And the worst is that the MDB is not called anymore even after seam initialization instead there are plenty of exceptoins.

            Therefore we found a work-around with 4.2.2 to activate the MDB when the whole EAR is deployed and it worked.