About lock

manual

[ODB1] Chapter 5 - JDO Connections

The PersistenShows how to use database connections and transactions in JDO. ceManagerFactory interface represents a factory of database connections. Its main role is to provide PersistenceManager instances. The PersistenceManager interface represents a database connection. Every operation on a database requires a PersistenceManager instance. The Transaction interface represents a transaction on a database. Every operation that modifies the content of the database requires an active transaction.[toc hidden:1]... ( ) ; } Automatic Lock Management ObjectDB manages an automatic lock mechanism in order to prevent a database object from being modified by two ...

 
forum_thread

Several parallel threads to speed up query on one DB

Hi, I have an application: producer (from a DB) to a consumer. The current bottleneck is the producer from DB (based on a query) and I would like to speed it up. I have tried using several entity managers (same DB instance) to benefit from the parallelisation - but it looks like I don't get much benefit from doing that.  ... used to do a clear after running each query - The lock contention disappears when I removed the "em.clear()" - Obviously I need ... in netbeans - select the Threads view (timeline) and the lock contention view. You can see that Thread R1 is running smoothly ...

 
forum_thread

Some technical questions

Hi, ObjectDB looks interesting. Have two technical questions... (1) what locking model does ObjectDB use? I.e. 2PL or MVCC? Do writers block readers? Do readers block writers? (2) what's the recommended usage for SAAS? One ObjectDB database per customer, or one ObjectDB database for all? Thank you, Andrej #1 2011-09-19 19:15 Hi, ObjectDB looks interesting. Have two technical questions... (1) what locking model does Objec ...

 
forum_thread

Attempt to open a non existing file '/tmp/objectdb_xxxx/SortQueryItr_6.mrg'

Hi, I came across an error - but i have not been able to create a simple reproducible case - the error does not happen often and does not happen always -  Let me explain: 1/ I run 5 java applications at the same time on one machine - each application is using an ODB file (each one is using a different one). Basically each application does a sorted query ( qqq = em.createQuery("SELECT bk FROM OBN bk ORDER BY bk.time ASC", OBN); ) 2/ after a little while - some of the applications throws this error message: ... of each temporary directory. In that directory a lock file, lock.lck , is created and hold for the life of the process (or class loader). ...

 
api-jpa

PessimisticLockScope.EXTENDED

In addition to the behavior for PessimisticLockScope.NORMAL, element collections and relationships owned by the entity that are contained in join tables will be locked if the javax.persistence.lock.scope property is specified with a value of PessimisticLockScope.EXTENDED.(Enum Constant of javax.persistence.PessimisticLockScope)

 
manual

JPA Named Queries

Explains how to define and how to run JPA named queries.... annotation element (Optional) The lock mode type to use in query execution. See JavaDoc Reference Page... ... setLockMode(lockMode) Query's method Set the lock mode type to be used for the query execution. See JavaDoc Reference ...

 
forum_thread

How to do multithreading with embedded ObjectDB

Hi, I've tried to implement a counter with ObjectDB, but the following code doesn't work as expected: ... than concurrently: synchronized ( lock ) { em. createQuery ( "UPDATE Point ... ( ) ; } Your lock object must be one object that is shared by all the threads. 2. ...

 
manual

[ODB1] Chapter 6 - Persistent Objects

Shows how to store, retrieve, update and delete database objects. ... in section 5.3 , ObjectDB manages an automatic lock mechanism in order to prevent two or more different PersistenceManager ... When a JDOHelper.isDirty(obj) is true a WRITE lock is used and when it is false a READ lock is used. When the state of ...

 
forum_thread

Setting temp directory location in ObjectDB

HI, I am using ObjectDB and would to change the temp directory location wihtout using objectDB.conf file. I am using JDO and setting the persistenceManager as follow properties.setProperty("javax.jdo.PersistenceManagerFactoryClass","com.objectdb.jdo.PMF"); properties.setProperty("javax.jdo.option.ConnectionURL", fileName.odb); pmf = JDOHelper.getPersistenceManagerFactory(properties), JDOHelper.class.getClassLoader()); #1 2011-08-02 15:49 HI, I am using ObjectDB and would to change the temp directory location wihtout using objectDB.conf fil ...

 
api-jdo

javax.jdo.Transaction

The JDO Transaction interface provides for initiation and completion of transactions under user control.(Interface of JDO)