ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
92

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
91

begin()

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

Obtaining a JPA Database Connection

, it is very easy to begin a transaction: em.getTransaction().begin
40

Database Connection using JPA

that is available via the getTransaction method: try { em.getTransaction().begin ... (); } A transaction is started by a call to begin and ended by a call to either commit or rollback
33

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
31

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
28

Chapter 3 - Using JPA

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

[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
18

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
16

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

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