ObjectDB Database Search

1-33 of 33 results

jakarta.persistence.LockModeType

Jakarta Persistence (JPA) Enum jakarta.persistence. LockModeType java.lang.Object ∟ java.lang.Enum ∟ jakarta.persistence. LockModeType Implemented Interfaces: FindOption , RefreshOption , Constable ... which may be obtained on an entity instance. A specific lock mode may be requested by passing an explicit LockModeType

jakarta.persistence.LockModeType.LockModeType()

Jakarta Persistence (JPA) Constructor in jakarta.persistence. LockModeType LockModeType () Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.LockModeType.READ

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType READ Synonymous with LockModeType .OPTIMISTIC . OPTIMISTIC is preferred for new applications. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.LockModeType.WRITE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType WRITE Synonymous with LockModeType .OPTIMISTIC_FORCE_INCREMENT . OPTIMISTIC_FORCE_INCREMENT is preferred for new applications. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager.refresh(Object,LockModeType)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void refresh (    Object entity ,    LockModeType lockMode ) Refresh the state of the given managed entity ... when there is no transaction and a lock mode other than LockModeType .NONE was specified; or if invoked

jakarta.persistence.EntityManager.refresh(Object,LockModeType,Map)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void refresh (    Object entity ,    LockModeType lockMode ,    Map properties ) Refresh the state ... when there is no transaction and a lock mode other than LockModeType .NONE was specified; or if invoked

jakarta.persistence.TypedQuery.setLockMode(LockModeType)

Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setLockMode (    LockModeType lockMode ) Set the lock mode type to be used for the query execution. Parameters: lockMode - lock mode Returns: the same query instance. Throws: IllegalStateException

jakarta.persistence.LockModeType.OPTIMISTIC

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType OPTIMISTIC Optimistic lock. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.LockModeType.OPTIMISTIC_FORCE_INCREMENT

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType OPTIMISTIC_FORCE_INCREMENT Optimistic lock, with version update. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.LockModeType.PESSIMISTIC_READ

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType PESSIMISTIC_READ Pessimistic read lock. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.LockModeType.PESSIMISTIC_WRITE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType PESSIMISTIC_WRITE Pessimistic write lock. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.LockModeType.PESSIMISTIC_FORCE_INCREMENT

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType PESSIMISTIC_FORCE_INCREMENT Pessimistic write lock, with version update. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.LockModeType.NONE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence. LockModeType NONE No lock. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.EntityManager.lock(Object,LockModeType,LockOption...)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void lock (    Object entity ,    LockModeType lockMode ,    LockOption... options ) Lock an entity instance belonging to the persistence context, obtaining the specified lock mode , using

jakarta.persistence.EntityManager.lock(Object,LockModeType)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void lock (    Object entity ,    LockModeType lockMode ) Lock an entity instance belonging to the persistence context, obtaining the specified lock mode . If a pessimistic lock mode type is specified

jakarta.persistence.EntityManager.lock(Object,LockModeType,Map)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void lock (    Object entity ,    LockModeType lockMode ,    Map properties ) Lock an entity instance belonging to the persistence context, obtaining the specified lock mode , using the specified

JPA Runtime Tuning & Configuration

exclusive ( WRITE ). Scope Usage Query setLockMode( LockModeType ) Operation Implements: FindOption ... setFlushMode N/A LockModeType N/A N/A setLockMode lock find refresh PessimisticLockScope Property

jakarta.persistence.EntityManager

pessimistic lock on an entity instance. The full range of possible lock types is enumerated by LockModeType ... an explicit LockModeType , allowing the client to request a specific type of lock. Interaction ... (JPA) 2.0 T find ( Class entityClass , Object primaryKey , LockModeType lockMode ) Find by primary key

Setting and Tuning of JPA Queries

lock on all the result objects: List results = query. setLockMode ( LockModeType . PESSIMISTIC_WRITE

jakarta.persistence.EntityNotFoundException

.getReference(Class,Object) EntityManager.refresh(Object) EntityManager.refresh(Object, LockModeType ) EntityManager.refresh(Object, java.util.Map) EntityManager.refresh(Object, LockModeType , java.util.Map) EntityManager.lock(Object, LockModeType ) EntityManager.lock(Object, LockModeType , java.util.Map

jakarta.persistence.LockOption

. See Also: LockModeType PessimisticLockScope Timeout EntityManager.lock(Object, LockModeType , LockOption...) Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.EntityResult

The class of the result. Since: Jakarta Persistence (JPA) 1.0 LockModeType lockMode The lock mode obtained by the SQL query. Default: LockModeType .OPTIMISTIC Since: Jakarta Persistence (JPA) 3.2 FieldResult

jakarta.persistence.TypedQuery

properties and hints. Since: Jakarta Persistence (JPA) 2.0 LockModeType getLockMode () Get the current ... ( LockModeType lockMode ) Set the lock mode type to be used for the query execution. Overrides Query

jakarta.persistence.EntityResult.lockMode

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityResult LockModeType lockMode The lock mode obtained by the SQL query. Default: LockModeType .OPTIMISTIC Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.EntityManager.refresh(Object,RefreshOption...)

, if any. If the supplied options include a LockModeType , lock the given entity, obtaining the given ... when there is no transaction and a lock mode other than LockModeType .NONE was specified; or if invoked on an extended

jakarta.persistence.FindOption

by the specification. See Also: LockModeType PessimisticLockScope CacheRetrieveMode CacheStoreMode

jakarta.persistence.Version

. See Also: LockModeType PersistenceUnitUtil.getVersion(Object) Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager.getLockMode(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager LockModeType getLockMode (    Object entity ) Get the current lock mode held by this persistence context on the given managed entity instance. Parameters: entity - a managed entity instance Returns: the lock mode

"Attempt to lock a non entity object" error

.getSelectedValue(),       LockModeType .PESSIMISTIC_WRITE); . . } //doEdit ... ; import javax.persistence.EntityManagerFactory; import javax.persistence. LockModeType ; import javax ... , LockModeType .PESSIMISTIC_WRITE);         System.out.println

pessimistic lock not released on commit

(); System.out.println("Thread A: trying to lock..."); MyEntity e = em.find(MyEntity.class, 1L, LockModeType ... .class, 1L, LockModeType .PESSIMISTIC_WRITE); System.out.println("Thread B: got lock, updating..."); e

Duplicate Entity class names causes Exception in Query

.CheckCacheThenDatabase); /* q.setLockMode( LockModeType .OPTIMISTIC); */ try { java.lang.Object r = q.getSingleResult

Optimistic locking failure

an exception in this case. support Support It would be great if was fixed the same problem with LockModeType

Unable to persist TreeMap

.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence. LockModeType ; import