users@glassfish.java.net

Glassfish + JPA + TOPLINK + (EJB/Web) + more than 1 Persistence Unit

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 May 2008 05:25:55 PDT

I've spent a lot of hours trying to replace JDBC with JPA + TOPLINK and I've got many problems and many references to the same code samples, to the same Toplink flaws:

- Toplink jars must be packaged in the war(if a web application) or jar because if Toplink has been initialized, it doesn't reinitialize and desn't find the persistence.xml
- you cannot use two persistence units because when you try to open the second, Toplinks finds itself initialized and it doesn't find the second p.u. And this happens also in a standard JavaSE app

I'm running the latest versions of Netbeans6.1, Glassfishv2ur2 and bundled libraries.

I would like to get a working project of such environment. I use Oracle 10 as DB, but I have also mySql and msSql.

Thanks
[Message sent by forum member 'aperezymadrid' (aperezymadrid)]

http://forums.java.net/jive/thread.jspa?messageID=274824