users@glassfish.java.net

Re: Working with JPA in a non EE environment

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 May 2007 07:53:09 PDT

Or
try {
if (em.getTransaction().isActive()) em.getTransaction().rollback();
} finally {
em.close();
}

I found this blog entry to be very helpful.

http://weblogs.java.net/blog/guruwons/archive/2006/09/understanding_t_1.html

Also there are several sessions on JPA during JavaOne[1]. I hope JPA in on Java EE environments (not just in unit test cases) is covered in these.

[1] : http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=3&yr=2007
[Message sent by forum member 'cprashantreddy' (cprashantreddy)]

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