Fast Object Database for Java - with JPA/JDO support

Internal Website Search

11-20 of 200 resultsRefresh
33

Obtaining a JPA Database Connection

in memory and applied to the database when the transaction is committed: em.getTransaction().commit(); The next section explains in more detail how to use the EntityManager and transactions for CRUD database operations.
32

[ODB1] Chapter 6 - Persistent Objects

.makePersistent(person); pm.currentTransaction().commit(); First, the Person instance is constructed as ... is automatically stored in the database when the transaction is committed (unless it is being deleted before commit). An attempt to call makePersistent(...) when there is no active transaction throws
30

Failed to commit transaction: Attempt to commit a rollback only transaction

Anyone know what this means?? Suddenly cropped up. Failed to commit transaction: Attempt to commit a rollback only transaction (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:271) at javax.jdo.Transaction$commit.call(Unknown Source) dmoshal David Moshal Some fatal exceptions mark
23

[ODB1] Chapter 5 - JDO Connections

.currentTransaction().commit(); } finally { if (pm.currentTransaction().isActive()) pm ... transactions. A transaction is started by a call to begin() and ended by a call to commit() or rollback ... with commit() propagates all the database modifications physically to the database. If for any reason
23

CRUD Operations with JPA

Explains how to use JPA for CRUD database operations (persist, retrieve, update, remove).
23

Chapter 3 - Using JPA

Explains how to store, retrieve, update and delete entity objects using JPA.
22

NullpointerException when execute a commit

to commit transaction: Unexpected internal exception at com.objectdb.o.MSG.d(MSG.java:75) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:304) .... Caused by: com.objectdb.o.InternalException: Unexpected ... .EMImpl.commit(EMImpl.java:299) ... 45 more Caused by: java.lang.NullPointerException at com.objectdb.o
21

Rollback after commit fail

() persist object1 em.getTransaction().commit(); } catch(...){ em.getTransaction ... ().commit(); } catch(...){ em.getTransaction().rollback(); } Parallel running threads caused that second thread commit will fail (primary key reuse exception), the exception is caught
21

EntityTransaction.commit() does not release a pessimistic lock

It appears that EntityTransaction.commit() does not release a pessimistic lock -> test code ... .getTransaction().begin(); em.persist(new Account(0)); em.getTransaction().commit ... ); em1.getTransaction().commit(); System.out.println(em1.getLockMode(a1)); // -> PESSIMISTIC_WRITE
21

Is it possible to commit only specific elements?

Hello, As stated above, I would like to know if it is possible to commit only specific elements, or ... , retrieving only the needed ones, creating new ones (which I want to commit), detaching the ones I've previously retrieved and finally committing. My context is big data and performance is an issue. btc

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