users@glassfish.java.net

Re: Hibernate and Spring not working on Glassfish 2

From: <glassfish_at_javadesktop.org>
Date: Tue, 05 Feb 2008 23:40:47 PST

Actually I've tried what woel suggested.
Unfortunately we had some major issues with this. E.g. I have seen a lot of cases where the Hibernate JPA implementation tries to load the persistence.xml without luck. The reason is that the jars in the gf lib directory are loaded by another classloader than the web application (which acutually contains the persistence.xml). Thus hibernate is not able to find the persistence.xml if you put the hibernate jars in the gf lib dir.
Another issue I have found is some weird behaviour if you are not careful using the right web.xml schema. Glassfish may behave completely different depending on the the schema version you are using. I made some tests using 2.4 and 2.5 and found out that the deployment process completes with totally different results/errors sometimes. E.g. you might not be able to put in RESOURCE_LOCAL if you are using 2.5. Maybe this helps some other people who are in favour of RESOURCE_LOCAL instead of JTA
[Message sent by forum member 'klausstake' (klausstake)]

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