0 Replies Latest reply on Apr 2, 2008 3:39 AM by Guy Coleman

    Injecting EJB2 entity homes into EJB3 beans

    Guy Coleman Newbie

      Should I be able to inject EJB2 homes into EJB3 beans?. This used to work on 5.0.0.Beta4 but doesn't with the latest 5.0.0 HEAD build - I'm trying to upgrade due to a problem with JBossWebRealm (fixed in r69776).

      I've got an EJB3 SLSB declared using annotations. I'm injecting an EJB2 entity home into it using ejb-jar.xml:

      @Stateless(name = "TaskManager")
      public class TaskManagerBean implements TaskManager
       protected ScheduledTaskHome scheduledTaskHome;


      The ScheduledTask entity deployed without any errors. The problem appears to be the SLSB thinks that the entity dependency is EJB3:

      08:24:41,721 ERROR [ProfileServiceBootstrap] [main] Failed to load profile: Summary of incomplete de
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
       -> <UNKNOWN>{Described:** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService **}
       -> <UNKNOWN>{Described:** UNRESOLVED Demands 'jboss.j2ee:ear=app.ear,name=ScheduledTask,servic
      e=EJB3,* **}