ObjectDB ObjectDB

Internal Website Search

1-9 of 9 resultsRefresh
104

setLockMode(lockMode)

Method javax.persistence.Query Query 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 - if the query is found not to be a Java Persistence query language SELECT query or a Criteria API query Since: JPA 2.0
104

setLockMode(lockMode)

Method javax.persistence.TypedQuery TypedQuery<X> 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 - if the query is found not to be a Java Persistence
83

Setting and Tuning of JPA Queries

. Therefore, when performance is important, this issue has to be considered. Lock Mode (setLockMode) ObjectDB ... . JPA 2 adds support for pessimistic locking. The setLockMode method sets a lock mode ... .setLockMode(LockModeType.PESSIMISTIC_WRITE) .getResultList(); Notice that when a query
28

JPA Named Queries

and hints, provide static replacement for the setLockMode and setHint methods. Every @NamedQuery annotation
14

Duplicate Entity class names causes Exception in Query

); //q.setHint(QueryHints.CACHE_USAGE, CacheUsage.CheckCacheThenDatabase); /* q.setLockMode
12

javax.persistence.TypedQuery

argument is not valid for the implementation Since: JPA 2.0 Query setLockMode( LockModeType lockMode ... a Criteria API query Since: JPA 2.0 TypedQuery<X> setLockMode( LockModeType lockMode) Set the lock mode
12

javax.persistence.LockModeType

.setLockMode() or TypedQuery.setLockMode() method. Lock modes can be used to specify either optimistic or
8

javax.persistence.Query

Query setLockMode( LockModeType lockMode) Set the lock mode type to be used for the query execution
2

Threaded Test - Failed to commit transaction: Unexpected internal exception

");                 Point p = (Point)q.setMaxResults(1).setLockMode(                     LockModeType.PESSIMISTIC_WRITE

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