Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] How to get only valid session instance

I'm researching a solution because I think the API has nothing to
respect validity flag. 

Our use case is using object marked read-only, but read via UOW, then
because the object is marked read-only, reading via UOW is like reading
directly from session cache, so invalidation flag is never respected.
The read-only flag has no other value in EclipseLink than providing some
performance gain, but most likely introduce unthread safe use case.

What I want to change is that invalidation flag be respected but still
keep the optimizations, and I don't care it's not thread safe.

So please tell me if I'm going to break something if I do the following:
- remove read-only flag
- still read via unit of work
- use custom InstantiationCopyPolicy that always provide clone and
backup that is self
- use custom DeferredChangeDetectionPolicy that never calculate any
changes, always returning no change


-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Sebastien
Tardif
Sent: Thursday, November 05, 2009 11:56 AM
To: EclipseLink User Discussions
Subject: [eclipselink-users] How to get only valid session instance

Does EclipseLink has an API to retrieve session instance in a way that
their invalidation flag is respected, so that the instances are
refreshed before being returned to the caller?

Of course their references/children should also have their invalidation
flag respected.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top