EclipseLink caching and Oracle Workspace Manager [message #677160] |
Tue, 07 June 2011 18:22 |
Dave Brosius Messages: 34 Registered: July 2009 |
Member |
|
|
Greetings,
We are investigating using Oracle Workspace Manager to provide database versioning support. We are also using EclipseLink. My question is regarding the interaction between eclipselink caching and oracle workspaces.
My understanding is that the resultset that is returned when using Workspace manager has no references to what workspace (version) the data is coming from. Assuming a mythical table called item with a primary key itemId, today's version of item with itemId=5 and last years version of item with itemId=5, will look the same from eclipselink's point of view.
Therefore, i'd expect if this year's item was in the eclipselink cache, when i switched workspaces, and loaded again, there would be a cache hit on this years item, even tho i'm pulling from last year's workspace and should get different data.
If this true, what have folks done to resolve this? I don't want to have to clear the eclipselink cache as I switch workspaces, because i will be bouncing back and forth between workspaces (based on different user's access).
I assume that some concept of the version from workspace manager will have to be injected into the returned data as (part of) a primary key in order for the eclipselink cache to work properly.
Has anyone had any experience in this regard?
|
|
|
Re: EclipseLink caching and Oracle Workspace Manager [message #683399 is a reply to message #677160] |
Mon, 13 June 2011 17:04 |
|
If you are switching versions in the same persistence unit then you should disable the shared cache.
You could have a different persistence unit (different EntityManagerFactory) for each version, or one for current with a shared cache, and use another for historical without a shared cache.
You may also want to look into EclipseLink historical sesssion and Oracle flashback support, as this seems similar.
James : Wiki : Book : Blog : Twitter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03598 seconds