Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink caching and Oracle Workspace Manager
EclipseLink caching and Oracle Workspace Manager [message #677160] Tue, 07 June 2011 18:22 Go to next message
Dave Brosius is currently offline Dave BrosiusFriend
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 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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
(no subject) [message #683406 is a reply to message #677160] Mon, 13 June 2011 17:04 Go to previous message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
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 : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
(no subject) [message #683409 is a reply to message #677160] Mon, 13 June 2011 17:04 Go to previous message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
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 : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
Previous Topic:Lob field fetch=FetchType.LAZY being ignored
Next Topic:(no subject)
Goto Forum:
  


Current Time: Thu Apr 25 13:21:45 GMT 2024

Powered by FUDForum. Page generated in 0.03598 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top