users@glassfish.java.net

Re: Two entity classes mapped to same table

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 May 2007 14:56:03 PDT

Hi Marina,

I'm not really sure why I'm getting this exception. I have two commits within the same transaction context, each of which are updating the same row, but via different entities. I tried calling merge before the end of the second session bean method, and now I get a StaleObjectStateException.

I suppose the container doesn't like the fact that we have two updates to the same row in the same transaction, but shouldn't it be able to resolve this?

Thanks,

Andrew
[Message sent by forum member 'asmithgf' (asmithgf)]

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