In the javadocs, we see:
"... element collections and relationships owned by the entity that are
contained in join tables will be locked ..."
Did we specify what it means to lock an element collection or relationship,
if other than locking the individual entity instances that those
collections/relationships refer to?
Or do some folks interpret this locking to include anti-insert, anti-delete
From: Linda DeMichiel [mailto:linda.demichiel@...]
Sent: Thursday, 11 July 2013 7:50 a.m.
Subject: [jsr338-experts] Re: locks and fetch graphs / eager fetching
On 7/10/2013 12:55 AM, Christian von Kutzleben wrote:
In our understanding EntityManager.lock() only applies the lock to the
specified entity and
also during lazy loading triggered by object navigation locks won't get
Yes. However, the javax.persistence.lock.scope property may be used to
extend the locking
to element collections and owned relationships in join tables.
But if a user specifies a lock-mode in the find or refresh method or for a
is this lock-mode supposed to be applied to all objects fetched* along because
of FetchType.EAGER or a configured fetch graph as well?
*fetched, or would be fetched if not already in context
No (however, again the lock.scope property may be applied to the entity that
is the target
of the operation).
*Christian von Kutzleben*
Chief Software Engineer
Versant GmbH, Subsidiary of Actian Corporation
PHONE +49 40 60990-273
FAX +49 40 60990-113
Versant GmbH is incorporated in Germany. Company registration number: HRB
54723, Amtsgericht Hamburg. Registered Office:
Halenreie 42, 22359 Hamburg, Germany. Geschäftsührer: Marc Monahan, Fred
Gallagher, Volker John
This transmission is confidential and intended solely for the use of the
recipient named above. It may contain
confidential, proprietary, or legally privileged information. If you are not
the intended recipient, you are hereby
notified that any unauthorized review, use, disclosure or distribution is
strictly prohibited. If you have received this
transmission in error, please contact the sender by reply e-mail and delete
the original transmission and all copies
from your system.
|Christian von Kutzleben||07/10/2013|
Message not available
[jpa-spec users] [jsr338-experts] Re: locks and fetch graphs / eager fetching