users@glassfish.java.net

Re: GF V3 Embedded Container: Problem with JPA, Entity is not managed

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Feb 2010 02:07:33 PST

Thank you Marina for reply.

I've thougt that the find method returns always an attached entity, but maybe I'm wrong here. When I'm adding following line in the testcase before the remove command:

holiday = holidayEJB.getEm().merge(holiday);

then a transaction exception occurs:

javax.persistence.TransactionRequiredException

But: The transactions are container managed, so i do not want to run a manual transaction.

So, what's wrong?
[Message sent by forum member 'pepatpx' (prope_at_t-online.de)]

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