users@glassfish.java.net

Re: Inconsistency between the persistence context and the database

From: <glassfish_at_javadesktop.org>
Date: Mon, 26 May 2008 12:59:55 PDT

Yes, the TimerTask is using an EntityManager to update the flag. There is a method called getPendingMsgs ( <a href="http://www.bluebricks.no/web/bbwebno.nsf/lupKey/getpendingmsgs">http://www.bluebricks.no/web/bbwebno.nsf/lupKey/getpendingmsgs</a>)
that first updates pending msgs with a flag and then fetches the updated msgs.
This method uses the session bean method updateMsgsCutoff ( <a href="http://www.bluebricks.no/web/bbwebno.nsf/lupKey/updatemsgscutoff">http://www.bluebricks.no/web/bbwebno.nsf/lupKey/updatemsgscutoff</a>)
to update the messages, and the method selectMessages ( <a href="http://www.bluebricks.no/web/bbwebno.nsf/lupKey/selectmessages">http://www.bluebricks.no/web/bbwebno.nsf/lupKey/selectmessages</a>)
to fetch them.

My understanding is that each of these bean methods will be run in their own container managed session.

When the messages are updated and fetched, the list of objects are then passed on to a worker thread in a pool.

// Marius
[Message sent by forum member 'mariusw' (mariusw)]

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