users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 Nov 2007 11:46:39 PST

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