4 Replies Latest reply on Mar 31, 2011 2:59 AM by jaikiran pai

    ejb injection

    rop Newbie

      Hi,

       

      I have a simple ear-app, with an no-interface-view EJB annotated with

          @Stateless(name="xxx")

      and a web-app that injects it with

          @EJB(name="xxx")

       

      This works fine when I deploy it in a single ear-file, with a war-file and an ejb-jar packed inside it.

       

      But if I just try to deploy the ejb-jar and war-file as two separate files, the web-app complaints:

       

      Deployment "..." is in error due to the following reason(s): java.lang.RuntimeException: Could not resolve @EJB reference: [EJB Reference: beanInterface ...

      ....etc...

       

      What do I need to do to make this work -- i.e. inject an EJB from a separate jar-file into a web-app in a different war-file?

       

      They are both on the same JBoss 6 instance.

       

      /BR