Skip to main content



      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 13:07 Go to next message
Eclipse UserFriend
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 11:30 Go to previous messageGo to next message
Eclipse UserFriend
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 13:55 Go to previous message
Eclipse UserFriend
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: Sun Nov 09 06:58:31 EST 2025

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

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

Back to the top