ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
169

Attempt to begin a new transaction when a transaction is active

.getTransaction().begin(); em.persist(r); em.getTransaction().commit(); System.out.println("Entity ... ._PersistenceException: Attempt to begin a new transaction when a transaction is active root cause com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active root cause
98

begin()

Method javax.persistence.EntityTransaction void begin() Start a resource transaction. Throws: IllegalStateException - if isActive() is true Since: JPA 1.0
35

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

._PersistenceException: Attempt to begin a new transaction when a transaction is active at com.sun.ejb ... : Attempt to begin a new transaction when a transaction is active Again, this used not to happen ... ) //'com.objectdb.o.UserException: Attempt to begin a new transaction
19

Storing JPA Entity Objects

", "Joseph", "Wurzelbacher"); em.getTransaction().begin(); em.persist(employee); em ... .setAddress(address); em.getTransaction().begin(); em.persist(employee); em.getTransaction ... can be used to save memory in large transactions: em.getTransaction().begin(); for (int i = 1; i
17

CRUD Database Operations with JPA

code fragment stores 1,000 Point objects in the database: em.getTransaction().begin(); for (int ... of an active transaction: em.getTransaction().begin(); em.remove(p); // delete entity em ... .getTransaction().begin(); p.setX(p.getX() + 100); // update entity em.getTransaction().commit
12

Setting and Tuning of JPA Queries

). The setFirstResult method is used to specify where the result window begins, i.e. how many results at the beginning of the complete result list should be skipped and ignored. The setMaxResults method
9

begin()

Method javax.jdo.Transaction void begin() Begin a transaction. The type of transaction is determined by the setting of the Optimistic flag. Throws: JDOUserException - if transactions are managed by a container in the managed environment, or if the transaction is already active. Since: JDO 1.0 See Also: setOptimistic getOptimistic
2

[ODB1] Chapter 6 - Persistent Objects

the following code: pm.currentTransaction().begin(); Person person = new Person("George", "Bush ... ); pm.currentTransaction().begin(); pm.makePersistent(person); pm.currentTransaction ... ().begin(); Person person = new Person("George", "Bush"); pm.makePersistent(person); Object oid = pm
1

[ODB1] Chapter 2 - A Quick Tour

[] args) { 10 11 // Create or open a database and begin a transaction: 12 ... pm.currentTransaction().begin(); 15 16 // Obtain a persistent list: 17 ... .getPersistenceManager(); 29 30 try { 31 // Begin the transaction: 32
1

[ODB1] Chapter 5 - JDO Connections

.currentTransaction().begin(); // Operations that modify the database should come here. pm ... transactions. A transaction is started by a call to begin() and ended by a call to commit() or rollback ... .getPersistenceManager(); Transaction tr = pm.currentTransaction(); try { tr.begin

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