0 Replies Latest reply on May 16, 2005 5:22 PM by Denis Souza

    Problem with Injection

    Denis Souza Newbie

      Hi,

      I'm having a problem when injecting a stateless bean into another stateless bean.

      If I declare the injection as:

       @Inject(jndiName = "my.package.MyStatelessBean")
       private MyStatelessBean bean;
      

      it works fine.

      But if I omit the jndiName parameter, it looks up a different jndi name which seems to be the same as the field's name. I get an exception such as:

      Unable to @Inject jndi dependency: bean into field private my.package.MyStatelessBean my.package.OtherStatelessBean.bean of class my.package.MyStatelessBean
      


      Is this a bug?
      I'm using EJB 3 Preview 5 and JBOSS 4.0.2RC1

      Thanks,
      DS