Hi, I was able to inject EntityManager in a servlet class by placing META-INF/persistence.xml in WEB-INF/classes. Only when META-INF/peristence.xml is placed in WEB-INF/classes does the web application is able to read the persistence.xml (application classloader is able to find it).
I felt it's quite offbeat to have META-INF/persistence.xml in WEB-INF/classes?? We usually have this META-INF folder at the root of archive (as a sibling to WEB-INF folder). Would this be a right option?? Thanks Phani On 5/29/08, Viet Nguyen <[EMAIL PROTECTED]> wrote: > I figure that you would have an EJB app that defines some entity beans > because you have a persistence.xml and you refer to this xml so that > you can get a hold of some Entity Beans via the EntityManagerFactory. > > -Viet >
