[jboss-user] [EJB 3.0] - Re: PersistenceContext injection into a JSF-technology manag
tswall
do-not-reply at jboss.com
Wed Dec 13 18:49:32 EST 2006
I have gotten the managed-bean to obtain an EntityManager reference now by calling:
| EntityManagerFactory emf = Persistence.createEntityManagerFactory("lynxManager");
| EntityManager em = emf.createEntityManager();
|
I still cannot inject it via:
| @PersistenceContext(unitName="lynxManager")
| private EntityManager em;
|
or via:
| @PersistenceUnit(unitName="lynxManager")
| private EntityManagerFactory emf;
|
I believe I've tried every concievable iteration and cannot seem to get any injection scheme to work within a JSF managed-bean. I suppose I have a workable solution, but according to the aforementioned Sun reference (here) I should be able to inject this...
Any ideas would be greatly appreciated,
Scott Wall
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993632#3993632
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993632
More information about the jboss-user
mailing list