3 Replies Latest reply on Aug 29, 2006 7:48 AM by sionut2

    @EJB injection not working

    dkkopp

      I am going crazy trying to get EJB injection working. I made a simple test case to try and isolate this.

      @Local
      public interface Session1Local
      {
      public String sayHello();
      }

      @Stateless
      public class SessionBean1 implements Session1Local
      {
      public String sayHello() { return "hello"; }
      }

      @Remote
      public interface Session2Remote
      {
      public String sayHello();
      }

      @Stateless
      public class Session2Bean implements Session2Remote
      {
      @EJB
      private Session1Local s1l;

      public String sayHello() { return s1l.sayHello(); }
      }

      This should work just fine, but Session1Local is never injected into Session2Bean.

      Is anyone else experiencing trouble with this?

        • 1. Re: @EJB injection not working
          pacuna

          Hi

          I'm having the same kind of problems and working to figure them out. As soon as I get a solution I'll tell you.

          Pedro

          • 2. Re: @EJB injection not working
            bill.burke

            we have unit tests that test this very case. You'll have to post a test case to jira.

            • 3. Re: @EJB injection not working
              sionut2

               

              "bill.burke@jboss.com" wrote:
              we have unit tests that test this very case. You'll have to post a test case to jira.


              This issue happens to me also.. I checked and I'm using the right EJB class (ie the one from javax.ejb not the one from javax.annotations). But still it doesn't work. I suspect it's related to the fact that I'm using JBoss Seam..

              Can you give me the location where I can find that unit test ? (I suppose it's on SVN, right ?) I want to take a look..

              Thanks,
              Ionut