users@glassfish.java.net

Options for forcing db read?

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Nov 2007 20:48:21 PST

If I have an object that was brought into memory in Entity Manager 1, and it has a OneToOne mapping to another entity, which will be updated frequently, how can I force that references to the object in EM1 will show the up to date data.

For example, I have a User entity and a OneToOne Mapping to AccountSummary object which contains the users current balance. When the user logs in the EM loads the User object into memory and the account summary object is used to display the balance on the screen. However, while the user is logged in another EM may be processing new transactions and updating the AccountSummary, how can I force that the AccountSummary object is always the latest and greatest?

Thanks.
[Message sent by forum member 'fsa3' (fsa3)]

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