About lock

1-10 of 180Refresh
Manual
260

Locking in JPA

JPA 2 supports both optimistic locking and pessimistic locking. Locking is essential to avoid update collisions resulting from simultaneous updates to the same data by two concurrent users. Locking in ObjectDB (and in JPA) is always at the database object level, i.e. each database object is locked
JPA Doc
63

lock(entity, lockMode, properties)

Method javax.persistence.EntityManager void lock(   Object entity,   LockModeType lockMode,   Map properties ) Lock an entity instance that is contained in the persistence context with the specified lock mode type and with specified properties. If a pessimistic lock mode type
JPA Doc
63

lock(entity, lockMode)

Method javax.persistence.EntityManager void lock(   Object entity,   LockModeType lockMode ) Lock an entity instance that is contained in the persistence context with the specified lock mode type. If a pessimistic lock mode type is specified and the entity contains a version attribute
Manual
55

Chapter 3 - Using JPA

This chapter explains how to manage ObjectDB databases using the Java Persistence API (JPA). The first two pages introduce basic JPA interfaces and concepts: The next section explains how to use JPA for database CRUD operations: More advanced topics (e.g. locking and events) are discussed in the last section:
Manual
39

Setting and Tuning of JPA Queries

. Therefore, when performance is important, this issue has to be considered. Lock Mode (setLockMode) ObjectDB uses automatic optimistic locking to prevent concurrent changes to entity objects by multiple users. JPA 2 adds support for pessimistic locking. The setLockMode method sets a lock mode
JPA Doc
33

javax.persistence.EntityManager

 primaryKey, LockModeType lockMode) Find by primary key and lock. Find by primary key and lock. Search for an entity of the specified class and primary key and lock it with respect to the specified lock type. If the entity instance is contained in the persistence context, it is returned from
Manual
28

Database Management Settings

="." mode="write" />   <locking version-check="true" /> locking> element <locking version-check="true" /> The version-check attribute of the <locking> element specifies
Result
28

ObjectDB Object Database Features [2018-01-27]

. Support of efficient real multithreading. Support of efficient real multiprocessing. Locking Automatic object versioning (can be injected to a @Version field). Optimistic locking (always active). Implicit pessimistic locking (JDO). Explicit pessimistic locking (JPA 2). Always Object Level locking
Result
28

ObjectDB Object Database Features [2018-10-27]

. Support of efficient real multithreading. Support of efficient real multiprocessing. Locking Automatic object versioning (can be injected to a @Version field). Optimistic locking (always active). Implicit pessimistic locking (JDO). Explicit pessimistic locking (JPA 2). Always Object Level locking
Result
28

ObjectDB Object Database Features

real multithreading. Support of efficient real multiprocessing. Locking Automatic object versioning (can be injected to a @Version field). Optimistic locking (always active). Implicit pessimistic locking (JDO). Explicit pessimistic locking (JPA 2). Always Object Level locking. Lock modes: READ/WRITE