1 Reply Latest reply on Mar 17, 2009 10:56 AM by jaikiran pai

    Access the EJB2 bean from EJB3 Service problem

    Konstantin Ermakov Newbie

      Hi!

      I am writing a small EJB3 Service app, which should call the EJB2 app. The code looks like this:

      
      @Service(name="MyService")
      @Depends("jboss.management.local:J2EEApplication=EJB2App.ear,J2EEServer=Local,j2eeType=EJBModule,name=EJB2App.jar")
      class MyManagement implements ManagementI, RemoteI {
      
      public void start() throws Exception() {
      
      ...
      
      ServiceHome home = (ServiceHome) context.lookup("IamHere");
      ServiceImpl impl = home.create(ctx); // <--
      
      ...
      
      };
      
      };
      
      
      


      As soon as I call "home.create" the jboss hangs. What I noticed, that If I will deploy my service after the JBoss start and EJB2 app will be completly deployed, everything works fine. It seems to me, that I have to wait for the "start" of EJB2 App and not for the "Deploy". Does somebody met the similar problem? Any ideas?