users@glassfish.java.net

Re: GF3 + OpenJPA 2.0 - Enhancer not working

From: Mitesh Meswani <mitesh.meswani_at_oracle.com>
Date: Tue, 20 Jul 2010 05:47:15 -0700

>the @PersistenceUnit(unitName="blablabla") annotated variable emfTmp stayed null, but the Enhancer is working. I verified this one by removing the @PersistenceUnit line and>got an error message stating, that the class accessed wasn't enhanced before.

That is very strange. I assume EntityManager is a valid JavaEE component capable of being injected. What is it?

In any case, using both injection and Peristence.createEMF() is very strange. Remove Persistence.createEMF(), rebuild, redeploy to see what happens.

Thanks,
Mitesh