2 Replies Latest reply on Oct 7, 2011 7:17 AM by goldm

    JBoss 6.1 EJB dependency policy

    goldm

      Hi,

       

      It seems there is different mechanism for evaluating dependencies/demands for EJB deployments in JBoss 6.1 then it was in JBoss 6.0.

      I can't find a reason why additional modules listed under demands (JBoss 6.1 log) have been evaluated. There is no dependency injection for EJB listed nor dependency defined via annotation.

       

      Can somobody point me to documentation about dependency policy, rules for dependency evaluation, or what was changed in 6.1 according to this?

       

      Log from JBoss 6.0:

       

      installing bean: jboss.j2ee:ear=iwm_sienet-VB36A-SNAPSHOT.ear,jar=iwm_business_logic-VB36A-SNAPSHOT.jar,name=AppInitConfig,service=EJB3

      20:09:18,380 INFO  [JBossASKernel]   with dependencies:

      20:09:18,380 INFO  [JBossASKernel]   and demands:

      20:09:18,380 INFO  [JBossASKernel]     jboss.ejb:service=EJBTimerService; Required: Described

      20:09:18,380 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_business_logic-VB36A-SNAPSHOT,name=AppInitConfig; Required: Create

      20:09:18,380 INFO  [JBossASKernel]   and supplies:

      20:09:18,380 INFO  [JBossASKernel]     Class:de.siemens.med.pacs.iwm.server.jmx.AppInitConfigMBean

      20:09:18,380 INFO  [JBossASKernel]     jndi:AppInitConfig

      20:09:18,380 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=iwm_sienet-VB36A-SNAPSHOT.ear,jar=iwm_business_logic-VB36A-SNAPSHOT.jar,name=AppInitConfig,service=EJB3) to KernelDeployment of: iwm_business_logic-VB36A-SNAPSHOT.jar

       

       

      Log from JBoss 6.1:

       

      installing bean: jboss.j2ee:ear=iwm_sienet-VB36A-SNAPSHOT.ear,jar=iwm_business_logic-VB36A-SNAPSHOT.jar,name=AppInitConfig,service=EJB3

      19:16:52,124 INFO  [JBossASKernel]   with dependencies:

      19:16:52,124 INFO  [JBossASKernel]   and demands:

      19:16:52,124 INFO  [JBossASKernel]    jboss.ejb:service=EJBTimerService; Required: Described

      19:16:52,124 INFO  [JBossASKernel]    jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_business_logic-VB36A-SNAPSHOT,name=AppInitConfig; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

      19:16:52,124 INFO  [JBossASKernel]     jboss-switchboard:appName=iwm_sienet-VB36A-SNAPSHOT,module=iwm_xxxxxxx-VB36A-SNAPSHOT,name=Xxxxx; Required: Create

       

      .

      .

      .

       

      19:16:52,124 INFO  [JBossASKernel]   and supplies:

      19:16:52,124 INFO  [JBossASKernel]     Class:de.siemens.med.pacs.iwm.server.jmx.AppInitConfigMBean

      19:16:52,124 INFO  [JBossASKernel]     jndi:AppInitConfig

      19:16:52,124 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=iwm_sienet-VB36A-SNAPSHOT.ear,jar=iwm_business_logic-VB36A-SNAPSHOT.jar,name=AppInitConfig,service=EJB3) to KernelDeployment of: iwm_business_logic-VB36A-SNAPSHOT.jar

        • 1. Re: JBoss 6.1 EJB dependency policy
          jaikiran

          Is AppInitConfig a @Service or a @Startup @Singleton bean? There was a bug in AS 6.0.0 where a @Service or a @Startup @Singleton bean would be initialized too early (before other EJBs had been deployed) leading to the issue reported in https://issues.jboss.org/browse/EJBTHREE-2227. We had to fix that by making sure that such beans "depend"  on the rest of the beans to be available before getting initialized.

          1 of 1 people found this helpful
          • 2. Re: JBoss 6.1 EJB dependency policy
            goldm

            Yes, AppInitConfig is @Service, we are using it to load configuration and it is supposed to be started before all business logic beans (@Stateless) - all these beans have dependency defined using annotation @Depends on AppInitConfig service. But what happens is that this service is not started because it is somehow dependent on other services and these services are dependend on one of business logic bean. So here what I don't understand is how this dependencies of AppInitConfig has been resolved. Should I try to change a type of AppInitConfig to some other type of bean?

             

            Thanks