Internal Website Search
1-50 of 200 resultsAttempt to begin a new transaction when a transaction is active(); emf.close(); } public void storeRecord(Record r) { em.getTransaction(). begin (); em.persist(r); em ... ._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 | |
EntityTransaction.begin() - JPA Method JPA Method in javax.persistence.EntityTransaction void begin () Start a resource transaction. Throws: IllegalStateException - if isActive() is true Since: JPA 1.0 | |
Storing JPA Entity Objects", "Joseph", "Wurzelbacher"); em. getTransaction (). begin (); em. persist (employee); em. getTransaction ... (address); em. getTransaction (). begin (); em. persist (employee); em. getTransaction (). commit ... . The combination of the clear and flush methods can be used to save memory in large transactions: em. getTransaction (). begin (); for (int i = 1; i | |
Setting and Tuning of JPA Queries anything outside that window). 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 | |
Obtaining a JPA Database Connection to begin a transaction: em. getTransaction (). begin (); There is a one to one relationship between | |
Database Connection using JPA that is available via the getTransaction method: try { em. getTransaction (). begin (); // Operations that modify ... (). isActive ()) em. getTransaction (). rollback (); } A transaction is started by a call to begin | |
Updating JPA Entity Objects. getTransaction (). begin (); employee.setNickname("Joe the Plumber"); em. getTransaction (). commit ... . getTransaction (). begin (); employee.projects[0] = new Project(); // not detected automatically | |
CRUD Database Operations with JPA Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store, retrieve, update and delete database objects. Storing New Entity Objects The following code fragment stores 1,000 Point objects in the database: em. getTransaction (). begin | |
Deleting JPA Entity Objects); em. getTransaction (). begin (); em. remove (employee); em. getTransaction (). commit (); The entity | |
Posting Sample Code.getTransaction(). begin (); MyEntity e = new MyEntity("test | |
Database Explorer , the Explorer automatically begins a new transaction for the next editing session. Options and Settings | |
objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active') Warning: javax.ejb.EJBException: com.objectdb.o._PersistenceException: Attempt to begin a new ... get that error: Caused by: com.objectdb.o.UserException: Attempt to begin a new transaction ... on next call to buildProject(String projectName) //'com.objectdb.o.UserException: Attempt to begin a new | |
EntityManager.refresh takes a long time; logger.log(Level.INFO, " begin select for person " + new Date().toString());   ... (Level.INFO, " begin refresh for person = " +   ... + " "+ new Date().toString()); } INFO: begin select for person | |
Transaction.begin() - JDO Method JDO Method in 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. See Also: setOptimistic getOptimistic Since: JDO 1.0 | |
Unexpected NoSuchFieldError exception; [ObjectDB 2.6.9_09] javax.persistence.PersistenceException Attempt to begin a new transaction when a transaction is active (error 612) at com.objectdb.jpa.EMImpl. begin (EMImpl.java:275) at javax.persistence.EntityTransaction$ begin .call(Unknown Source) at app.database.ObjectDbDatabase.transact | |
[ODB1] Chapter 6 - Persistent Objects demonstrated by the following code: pm.currentTransaction(). begin (); Person person = new Person("George ... .currentTransaction(). begin (); pm.makePersistent(person); pm.currentTransaction().commit(); Multiple objects ... (). begin (); Person person = new Person("George", "Bush"); pm.makePersistent(person); Object oid = pm | |
evictAll() behavior(); pm.currentTransaction(). begin (); System.out.println("Cache size after commit= " + pm ... ) and there is a result OBJECTDB OUTPUT: main--testDbProvisioning Cache size before COMMIT/ BEGIN = 1 transient transient Cache size after COMMIT/ BEGIN = 2630 transient transient Cache size after pm.evict = 2630   | |
How to Use a SF with extended Persistence Context? to the SF I get com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active. In principal The SF doesn't need to begin any transaction since it only get called ... ._PersistenceException: Attempt to begin a new transaction when a transaction is active at com | |
Merge Issue: Attempt to reuse an existing primary key value().isActive()) { em.getTransaction(). begin ... ; em.getTransaction(). begin ();   ... = emf.createEntityManager(); em.getTransaction(). begin | |
Is it possible to remove parent/child entities without refresh?(). begin (); entityManager.persist(parentEntity); parentEntity.addChild(new ChildEntity ... = entityManager.find(ParentEntity.class, Long.valueOf(1)); entityManager.getTransaction(). begin ... .refresh(parentEntity); entityManager.getTransaction(). begin (); ChildEntity childEntity2 | |
[ODB1] Chapter 2 - A Quick Tour // Create or open a database and begin a transaction: 12 PersistenceManager pm = 13 Utilities.getPersistenceManager("hello.odb"); 14 pm.currentTransaction(). begin (); 15 16 // Obtain a persistent list: 17 ... PersistenceManager pm = pmf.getPersistenceManager(); 29 30 try { 31 // Begin the transaction: 32 pm | |
[ODB1] Chapter 5 - JDO Connections: PersistenceManager pm = pmf.getPersistenceManager(); try { pm.currentTransaction(). begin (); // Operations ... for managing transactions. A transaction is started by a call to begin () and ended by a call to commit ... above: PersistenceManager pm = pmf.getPersistenceManager(); Transaction tr = pm.currentTransaction(); try { tr. begin | |
Step 4: Add a Servlet Class.getTransaction(). begin (); em.persist(new Guest(name)); em.getTransaction().commit(); } // Display the list | |
Step 3: Define an EJB Session Bean transaction begin and commit . The next step is adding a Servlet Class that will serve as the application controller. | |
Step 3: Define a Spring DAO Component transaction begin and commit . The next step is adding a Controller Class . | |
Step 3: Add a Main Class = emf.createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction(). begin (); for (int i = 0; i | |
Step 3: Add a Main Class.createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction(). begin (); for (int i = 0; i | |
Step 3: Define a Spring DAO Component transaction begin and commit . The next step is adding a Controller Class . | |
Step 3: Define an EJB Session Bean begin and commit . The next step is adding a Servlet Class that will serve as the application controller. | |
Step 4: Add a Servlet Class.getParameter("name"); if (name != null) { em.getTransaction(). begin (); em.persist(new Guest(name)); em | |
javax.persistence.EntityTransaction Methods void begin () Start a resource transaction. Throws: IllegalStateException - if isActive() is true | |
javax.persistence.EntityManager. The EntityTransaction instance may be used serially to begin and commit multiple transactions. Return | |
EntityManager.getTransaction() - JPA Method JPA Method in javax.persistence.EntityManager EntityTransaction getTransaction () Return the resource-level EntityTransaction object. The EntityTransaction instance may be used serially to begin and commit multiple transactions. Return: EntityTransaction instance Throws: IllegalStateException - if invoked on a JTA entity manager Since: JPA 1.0 | |
[ODB1] Chapter 9 - ObjectDB Explorer Changes", the Explorer automatically begins a new transaction for the next editing session | |
[ODB1] Chapter 4 - JDO Metadata to its value at the beginning of the transaction. default-fetch-group (true | false) The default-fetch-group | |
Tracking changes to new collections (in enhancement mode) after flush; em.getTransaction(). begin ... .createEntityManager(); em.setFlushMode(FlushModeType.AUTO); em.getTransaction(). begin (); ModelElementImpl ... .createEntityManager(); em.setFlushMode(FlushModeType.AUTO); em.getTransaction(). begin | |
javax.jdo.Transaction may only be used with bean-managed transaction semantics. Since: JDO 1.0 Public Methods void begin () Begin a transaction. The type of transaction is determined by the setting of the Optimistic flag ... to their values as of the beginning of the transaction, and the instances revert to transient. Additionally | |
javax.jdo.spi.PersistenceCapable returns the object id as of the beginning of the current transaction. Return: a copy of the ObjectId of this instance as of the beginning of the transaction. See Also: PersistenceManager.getObjectId | |
PersistenceManagerFactory.setRestoreValues(restoreValues) - JDO Method of newly persistent instances are restored to their values as of the beginning of the transaction ... and immutable reference types are restored to their values as of the beginning of the transaction | |
javax.jdo.PersistenceManagerFactory , at rollback, fields of newly persistent instances are restored to their values as of the beginning ... of primitive types and immutable reference types are restored to their values as of the beginning | |
Transaction.setRestoreValues(restoreValues) - JDO Method of the beginning of the transaction, and the instances revert to transient. Additionally, fields ... of the beginning of the transaction. If false , at rollback, the values of fields of newly persistent | |
PersistenceCapable.jdoGetObjectId() - JDO Method is being changed in the transaction, this method returns the object id as of the beginning of the current transaction. Return: a copy of the ObjectId of this instance as of the beginning of the transaction | |
StateManager.getObjectId(pc) - JDO Method JDO Method in javax.jdo.spi.StateManager Object getObjectId ( PersistenceCapable pc ) Return the object representing the JDO identity of the calling instance. If the JDO identity is being changed in the current transaction, this method returns the identity as of the beginning | |
JDOHelper.getObjectId(pc) - JDO Static Method - the PersistenceCapable instance. Return: a copy of the ObjectId of the parameter instance as of the beginning | |
javax.jdo.JDOHelper - the PersistenceCapable instance. Return: a copy of the ObjectId of the parameter instance as of the beginning | |
PersistenceManager.getObjectId(pc) - JDO Method key fields, then this method returns the identity as of the beginning of the transaction. The value | |
javax.jdo.spi.StateInterrogation of the ObjectId of the parameter instance as of the beginning of the transaction | |
javax.jdo.spi.StateManager as of the beginning of the transaction. Parameters: pc - the calling PersistenceCapable instance | |
StateInterrogation.getObjectId(pc) - JDO Method instance as of the beginning of the transaction. See Also: PersistenceManager.getObjectId (Object | |
javax.jdo.PersistenceManager as of the beginning of the transaction. The value returned by getObjectId will be different following |