atom feed6 messages in net.java.dev.glassfish.usersRe: GF V3 Embedded Container: Problem...
FromSent OnAttachments
glas...@javadesktop.orgFeb 10, 2010 2:30 am 
Marina VatkinaFeb 10, 2010 1:32 pm 
glas...@javadesktop.orgFeb 11, 2010 2:05 am 
Marina VatkinaFeb 11, 2010 11:48 am 
glas...@javadesktop.orgFeb 11, 2010 10:34 pm 
Marina VatkinaFeb 12, 2010 12:19 pm 
Subject:Re: GF V3 Embedded Container: Problem with JPA, Entity is not managed
From:Marina Vatkina (Mari@Sun.COM)
Date:Feb 11, 2010 11:48:00 am
List:net.java.dev.glassfish.users

merge() needs to be done inside the remove() method of the EJB.

-marina

glas@javadesktop.org wrote:

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' (pro@t-online.de)]

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