About lock

1-10 of 182Refresh
Manual
369

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
96

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
96

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
53

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
38

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
Forum
34

Lock prevents PersistenceManager.close when retainValues = false

this is the result of a lock) when I try to close the persistence manager, but only if 'retainValues' is set ... (BufferedInputStream.java:265) - locked <15cdd45> (a java.io.BufferedInputStream) at java.io ... .Thread.run(Thread.java:748) Locked ownable synchronizers: - locked (a java.util
Forum
33

Pessimistic Lock Timeouts setting

Hi,   I realise that JPA2 doesn't necessarily define a standard API way for Lock Timeouts. However, there is a standardised query 'hint' that can be setup to make the underlying DB lock a record for a specific time. The hint property is: "javax.persistence.lock.timeout" I have a situation
Forum
33

locks on pure query activities

that are just doing simple queries (just selects, no update or delete ...) show locks like these (question is: why there are locks and how could we get rid of that):   log1: "qtp1523553211-271" #271 prio ... ) - waiting to lock <0x0000000202239c10> (a com.objectdb.o.LFL) at com.objectdb.o.PAG
Forum
32

Pessimestic Locking doesn't release when application unexpectedly terminates.

. Our approach to this was to use Objectdb's pessimestic locking. This seems to work, but if the owner of the current pessimestic lock abruptly quits without releasing the lock it doesn't get released.    Is there anyway the server can detect that a client (lock owner is no longer connected
Issue
32

each 1-2 days objects on some objectdb level lock/block each other

thread dump shows a page cache lock (0x00000000b6681e10) by one thread. The second thread dump ... -file-read" option. In both cases it is not a deadlock but a very short lock that is not expected ... " /> <locking version