ObjectDB ObjectDB

Internal Website Search

1-10 of 195 resultsRefresh
309

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
69

lock(entity, lockMode, properties)

Method javax.persistence.EntityManager void lock( Object entity, LockModeType lockMode, Map<String,Object> 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 is specified
69

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, the persistence
41

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:
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
32

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
29

Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events.
4

[ODB1] Chapter 5 - JDO Connections

Lock Management ObjectDB manages an automatic lock mechanism in order to prevent a database object ... the database a READ lock on that object is obtained by the PersistenceManager. On every attempt to modify a persistent object, within an active transaction, a WRITE lock is obtained on that object by
3

[ODB1] Chapter 6 - Persistent Objects

, and also if one of the persistent fields of obj has been modified. Object States and Locks As explained in section 5.3, ObjectDB manages an automatic lock mechanism in order to prevent two or ... states and object locks. Only persistent transactional objects that are not new are locked
3

javax.jdo.JDOEntityManager

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 ... if the lock method had been called on the entity. If the entity is found within the persistence

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support