Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Can Value Holder Indirection be used with JPA?
Can Value Holder Indirection be used with JPA? [message #1795881] Mon, 01 October 2018 17:07 Go to next message
David Mulligan is currently offline David MulliganFriend
Messages: 13
Registered: February 2010
Junior Member
We have run into a deadlock situation in WriteLockManager.aquireLocksForClone, ConcurrencyManager.aquire and ConcurrencyManager.releaseDeferredLock. The standard advice is to weave and set the fetch type to lazy. My project does not currently use weaving and when confirming that indirection is the answer I discovered mapping issues that did not appear otherwise and thus we have a lot of testing to do.
As a short term solution I would like to use Value Holder Indirection with one-to-one mappings using JPA. Is this possible? Every permutation I tried failed. The error message was typically: "The attribute [myValueHolder] is declared as type ValueHolderInterface, but its mapping does not use indirection" even though I had fetch=FetchType.LAZY in the mapping.
Re: Can Value Holder Indirection be used with JPA? [message #1796420 is a reply to message #1795881] Fri, 12 October 2018 15:30 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I don't believe it can directly. JPA processing can't handle or understand the valueholder type, which isn't part of the JPA spec. It'll take some work as I don't believe there are examples or anything available that will clearly define all the steps you'll need to take, but EclipseLink should be fully customizable. You will need customizers to 'fix' the mappings the JPA would create - http://www.eclipse.org/eclipselink/documentation/2.4/jpa/extensions/a_customizer.htm, or just use this same method to create the DatabaseMapping directly instead of letting JPA processing do it.
Re: Can Value Holder Indirection be used with JPA? [message #1797123 is a reply to message #1796420] Thu, 25 October 2018 17:55 Go to previous message
David Mulligan is currently offline David MulliganFriend
Messages: 13
Registered: February 2010
Junior Member
Thank you Chris. In retrospect the reason I asked this is I have one isolated entity mapped. When even one completely unconnected entity is mapped as @Cacheable(false) the shared cache is not used in some situations. This leads to the deadlock I am encountering as well as a significant performance hit when the deadlock is not encountered.
Previous Topic:Factory create entitiymanager container
Next Topic:Spring, EclipseLink, Jboss eap 7 with XA datasource...issue with autocommit
Goto Forum:
  


Current Time: Tue Apr 23 10:13:24 GMT 2024

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

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

Back to the top