On Mar 6, 2008, at 6:27 AM, wesley wrote: > Hi Scott, > > I've expierenced a wired problen using @PersistenceUnit.
Thanks. I've filed it as http://bugs.caucho.com/view.php?id=2498. That's an odd bug. I assume it's some kind of lazy-init issue. -- Scott > > > ===================Not functional!======================== > @Component > public class PersistenceStrategy { > > // @PersistenceContext(unitName = "myunit") > // EntityManager em; > > @PersistenceUnit(unitName = "myunit") > EntityManagerFactory emf; > > ... // using emf, resin said > // com.mycompany.PersistenceStrategy.emf: > @PersistenceUnit(unitName='myunit') > // is an unknown persistence unit. > // No matching JPA persistence-units have been deployed > > } > ============================================================ > > > =========================OK================================= > @Component > public class PersistenceStrategy { > > @PersistenceContext(unitName = "myunit") > EntityManager em; > > @PersistenceUnit(unitName = "myunit") > EntityManagerFactory emf; > > ... // using emf, just leaving em unused > } > ============================================================ > > I'm use Hibernate 3.2 as my persistence layer, with 3.1.s080304 > snapshot. > Other configurations were normal and simple, as > http://wiki.caucho.com/Hibernate > recommended. > > Regards > > - Wesley > > > _______________________________________________ > resin-interest mailing list > [email protected] > http://maillist.caucho.com/mailman/listinfo/resin-interest _______________________________________________ resin-interest mailing list [email protected] http://maillist.caucho.com/mailman/listinfo/resin-interest
