List Info

Thread: Re: TopLink thread deadlock re UserTransaction.commit() in message-driven




Re: TopLink thread deadlock re UserTransaction.commit() in message-driven
user name
2007-11-06 12:35:45
What do you mean when you indicate that you update the
primary key?  Does an object exist either in the DB or in
your application with a certain primary key and then have
that primary key changed?  If so, that is likely the reason
for your problem.  Changing the identity of an object is
simply not allowed in JPA.
[Message sent by forum member 'tware' (tware)]

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


------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribeglassfish.dev.java.net
For additional commands, e-mail: users-helpglassfish.dev.java.net


Re: TopLink thread deadlock re UserTransaction.commit() in message-driven
user name
2007-11-06 13:46:39
The primary key is annotated with GeneratedValue(strategy=GenerationType.IDENTITY)
and we found in earlier work that after the entity was
persisted in the DB, the primary key
in the entity object that we had a reference to was not
updated. We found that adding the
flush() call after the persist() forced the entity object's
primary key to be set from the
now-persisted and auto-generated primary key in the DB.
[Message sent by forum member 'skalynuk' (skalynuk)]

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


------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribeglassfish.dev.java.net
For additional commands, e-mail: users-helpglassfish.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )