[jboss-user] [EJB 3.0] - EJb access - jndi works - injection doesn't know why not

stephan.opitz do-not-reply at jboss.com
Fri Sep 15 08:03:20 EDT 2006


in jsf i want access to ejb

public class DataFactory {

       @EJB
       private CategoriesLangFacade categoriesLangFacade;

       public CategoriesLangFacade getCategoriesLangFacade() {

               return categoriesLangFacade;
       }

}

solves categoriesLangFacade as null;

without @EJB and jndi-lookup in the getCategoriesLangFacade it works
under jboss 4.04ga - but why resource injection does not work ?

########################################

public interface CategoriesLangFacade {

       public CategoriesLang findById(long categoriesLangId, long languageId);

}

#######################################

@Local({CategoriesLangFacade.class})
@Stateless
public class CategoriesLangImp implements CategoriesLangFacade {

       @PersistenceContext(unitName = "ShaleTestPU")
       private EntityManager em;

       public static final String Remote = CategoriesLangImp.class
                       .getSimpleName()
                       + "/remote";

       public static final String Local = CategoriesLangImp.class
                       .getSimpleName()
                       + "/local";

       public CategoriesLang findById(long categoriesLangId, long languageId) {
...


any solution or idea?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971909#3971909

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971909



More information about the jboss-user mailing list