[jboss-user] [EJB 3.0] - EJB dependency injection
pesho4uka
do-not-reply at jboss.com
Sun Feb 11 12:33:19 EST 2007
Hello I have a "small" problem with the @EJB anotation.
I have created the following Bean:
@Stateless
public class CathegoryFacadeBean implements CathegoryFacadeRemote {
@PersistenceContext(type=PersistenceContextType.TRANSACTION) EntityManager em;
public List getAllCathegories() {
List cats = em.createNamedQuery("findAllCathegory").getResultList();
return null;
}
}
I am then using
@EJB CathegoryFacadeRemote cathegories;
from a JSF Backing bean. But the cathegories is null! I also tried to specify the "name" attribute of the anotation but no success. Can you tell me what to do in order to use the dependency injection?
Thank you in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014582#4014582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014582
More information about the jboss-user
mailing list