[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Query returning stale results existing
|
James Sutherland wrote:
>
> EntityManager.refresh() is the only way in the JPA spec to ensure an
> object is refreshed. If you use optimistic locking or the the read lock()
> API you can guarantee that the transaction will fail if the object is out
> of date.
>
> EclipseLink also defines a Query hint "eclipselink.refresh" to allow a
> query to force a refresh. The are also may different caching options,
> such as invalidation, auto-refreshing, isolation, and cache coordination.
>
EntityManager.refresh() worked :)
PS: It would be nice if cache expiration settings were available at the
persistence.xml level. Ideally I want to isolate all EclipseLink-specific
features to that file and keep my classes portable across all JPA
implementations.
Thank you,
Gili
--
View this message in context: http://www.nabble.com/Query-returning-stale-results-existing-tp20559804p20583477.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.