Internal Website Search

1-50 of 200 results

Database Transaction Replayer

of the database at the end of a specific transaction . The ID of that transaction is used as the name of the file. A recording file, with the same transaction ID in its name, contains database operations that have been recorded after that transaction . Recorded operations can be replayed

Database Connection using JPA

the content of a database require active transactions . Transactions are managed by an EntityTransaction ... ) must be performed within an active transaction . The EntityTransaction interface represents and manages database transactions . Every EntityManager holds a single attached EntityTransaction instance

Locking in JPA

is locked separately. Optimistic locking is applied on transaction commit. Any database object ... by another transaction . When using ObjectDB, optimistic locking is enabled by default and fully ... must be revealed earlier (before transaction commit) pessimistic locking can be used. When using

javax.persistence.PersistenceContextType.TRANSACTION

JPA Enum Constant in javax.persistence.PersistenceContextType TRANSACTION Transaction -scoped persistence context Since: JPA 1.0

Storing JPA Entity Objects

its state to Managed. The new entity object is stored in the database when the transaction ... values). A TransactionRequiredException is thrown if there is no active transaction when persist is called because operations that modify the database require an active transaction . If the database

Working with JPA Entity Objects

via an EntityManager’s persist method, which must be invoked within an active transaction . On transaction commit ... Entities section. If a managed entity object is modified within an active transaction the change is detected by the owning EntityManager and the update is propagated to the database on transaction

Obtaining a JPA Database Connection

should only be performed within an active transaction . Given an EntityManager , em, it is very easy to begin a transaction : em. getTransaction (). begin (); There is a one to one relationship between ... returns. When a transaction is active you can invoke EntityManager methods that modify the database

Deleting JPA Entity Objects

transaction , it can be deleted using the remove method: Employee employee = em. find (Employee.class, 1 ... object is physically deleted from the database when the transaction is committed. Embedded objects that are contained in the entity object are also deleted. If the transaction is rolled back and not

Database Explorer

. Saving Changes The Explorer manages an active transaction for every open database file. All the editing operations are associated with the active transaction . The File Save menu command commits the transaction (applying all the changes to the database). The File Discard Changes menu command

Updating JPA Entity Objects

from inside an active transaction : Employee employee = em. find (Employee.class, 1); em ... (); The entity object is physically updated in the database when the transaction is committed. If the transaction is rolled back and not committed the update is discarded. On commit the persist operation

Detached Entity Objects

, which clears an EntityManager 's persistence context. Rolling back a transaction - either by invocation ... if there is no active transaction when merge is called because operations that might modify the database require an active transaction . Cascading Merge Marking a reference field with CascadeType . MERGE (or

DELETE Queries in JPA/JPQL

;within an active transaction , either explicitly by calling the  remove method or implicitly ... within an active transaction and the changes are visible to other users (who use other EntityManager instances ... "). executeUpdate (); A  TransactionRequiredException is thrown if no transaction is active

UPDATE SET Queries in JPA/JPQL

;within an active transaction . Applying changes to the database by calling the commit method. JPQL UPDATE queries ... transaction and the changes are visible to other users (who use other EntityManager instances ... (); A  TransactionRequiredException is thrown if no transaction is active. On success

JPA Exceptions

transaction is represented by: Database update failures that require transaction rollback are represented by ... ; (which can be obtained by the getCause method) . For example, if a transaction fails

JPA Lifecycle Events

within an active transaction , the transaction is marked for rollback and no more callback methods are invoked

Database Management Settings

, with $ added at the end. Every transaction commit is first written to the recovery file

[ODB1] Chapter 5 - JDO Connections

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 . The focus of this chapter is on setting up a runtime

[ODB1] Chapter 6 - Persistent Objects

. When a transient object becomes persistent during an active transaction , its content 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 an exception

Step 3: Define a Spring DAO Component

. transaction .annotation. Transactional ; @Component public class GuestDao { // Injected database connection: @PersistenceContext private EntityManager em; // Stores a new guest: @ Transactional public ... ). Handles transactions automatically for methods that are annotated with the  @ Transactional

Step 3: Define a Spring DAO Component

.springframework. transaction .annotation. Transactional ; @Component public class GuestDao { // Injected database connection: @PersistenceContext private EntityManager em; // Stores a new guest: @ Transactional public ... ). Handles transactions automatically for methods that are annotated with the @ Transactional annotation

[ODB1] Chapter 2 - A Quick Tour

// Create or open a database and begin a transaction : 12 PersistenceManager pm = 13 Utilities ... .hasNext()) 34 System.out.println(itr.next()); 35 36 // Close the transaction and the database: 37 pm ... the content of the database, a transaction is begun (line 14), because in JDO, operations that affect

javax.jdo.Transaction

JDO Interface Transaction The JDO Transaction interface provides for initiation and completion of transactions under user control. It is a sub-interface of the PersistenceManager that deals with options and transaction demarcation. Transaction options include whether optimistic concurrency control

Step 6: Set the Spring XML

and transactions ), to inject a JPA  EntityManager , to manage transactions and to look for JSP pages in

Step 6: Set the Spring XML

, controllers and transactions ), to inject a JPA EntityManager , to manage transactions and to look

Step 3: Define an EJB Session Bean

(because it is annotated with the  @PersistenceContext annotation). Handles transactions automatically ... transaction   begin and  commit . The next step is adding a Servlet Class that will serve as the application controller.

Step 3: Define an EJB Session Bean

(because it is annotated with the @PersistenceContext annotation). Handles transactions automatically using JTA - no need to wrap every operation that modifies the database (such as persist ) by transaction

[ODB1] Chapter 9 - ObjectDB Explorer

an active transaction for every open database file. All editing operations (including loading classes ... with the active transaction . The "File | Save" menu command (and the equivalent toolbar button) commits the transaction which applies all the changes to the database. The "File | Discard Changes" menu

Transaction.setIsolationLevel(level) - JDO Method

JDO Method in javax.jdo. Transaction void setIsolationLevel (   String level ) Set the value for transaction isolation level for this transaction . Transaction isolation levels ... serializable Parameters: level - the transaction isolation level See Also: getIsolationLevel () Constants.TX

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

Transaction.rollback() - JDO Method

JDO Method in javax.jdo. Transaction void rollback () Roll back the current transaction . Throws: JDOUserException - if transactions are managed by a container in the managed environment, or if the transaction is not active. Since: JDO 1.0

Transaction.commit() - JDO Method

JDO Method in javax.jdo. Transaction void commit () Commit the current transaction . Throws: JDOUserException - if transactions are managed by a container in the managed environment, or if the transaction is not active. Since: JDO 1.0

Transaction.getIsolationLevel() - JDO Method

JDO Method in javax.jdo. Transaction String getIsolationLevel () Get the value for transaction isolation level for this transaction . Return: the transaction isolation level See Also: setIsolationLevel Since: JDO 2.2

Transaction.setRollbackOnly() - JDO Method

JDO Method in javax.jdo. Transaction void setRollbackOnly () Sets the rollback-only status of the transaction to true . After this flag is set to true , the transaction can no longer be committed, and any attempt to commit the transaction will throw JDOFatalDataStoreException . Since: JDO 2.0

javax.jdo.annotations.Transactional

JDO Annotation Transactional Target: ElementType.FIELD, ElementType.METHOD Implemented Interfaces: Annotation Annotation to indicate that a member (field or property) is transactional but not persistent. This corresponds to xml attribute persistence-modifier=" transactional " of "field

Transaction.getPersistenceManager() - JDO Method

JDO Method in javax.jdo. Transaction PersistenceManager getPersistenceManager () The Transaction instance is always associated with exactly one PersistenceManager . Return: the PersistenceManager for this Transaction instance Since: JDO 1.0

Transaction.setRestoreValues(restoreValues) - JDO Method

JDO Method in javax.jdo. Transaction void setRestoreValues (   boolean restoreValues ... 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

Transaction.getRollbackOnly() - JDO Method

JDO Method in javax.jdo. Transaction boolean getRollbackOnly () Returns the rollback-only status of the transaction . When begun, the rollback-only status is false. Either the application or the JDO implementation may set this flag using setRollbackOnly. Return: true if the transaction has been marked for rollback. Since: JDO 2.0

Transaction.isActive() - JDO Method

JDO Method in javax.jdo. Transaction boolean isActive () Returns whether there is a transaction currently active. Return: true if the transaction is active. Since: JDO 1.0

Transaction.setOptimistic(optimistic) - JDO Method

JDO Method in javax.jdo. Transaction void setOptimistic (   boolean optimistic ) Optimistic transactions do not hold data store locks until commit time. If an implementation does not support this option, a JDOUnsupportedOptionException is thrown. Parameters: optimistic - the value of the Optimistic flag. Since: JDO 1.0

Transaction.getOptimistic() - JDO Method

JDO Method in javax.jdo. Transaction boolean getOptimistic () Optimistic transactions do not hold data store locks until commit time. Return: the value of the Optimistic property. Since: JDO 1.0

Transaction.setNontransactionalWrite(nontransactionalWrite) - JDO Method

JDO Method in javax.jdo. Transaction void setNontransactionalWrite (   boolean nontransactionalWrite ) If true , allow persistent instances to be written without a transaction active. If an implementation does not support this option, a JDOUnsupportedOptionException is thrown

Transaction.getNontransactionalRead() - JDO Method

JDO Method in javax.jdo. Transaction boolean getNontransactionalRead () If true , allows persistent instances to be read without a transaction active. Return: the value of the nontransactionalRead property Since: JDO 1.0

Transaction.getNontransactionalWrite() - JDO Method

JDO Method in javax.jdo. Transaction boolean getNontransactionalWrite () If true , allows persistent instances to be written without a transaction active. Return: the value of the nontransactionalWrite property Since: JDO 1.0

Transaction.setNontransactionalRead(nontransactionalRead) - JDO Method

JDO Method in javax.jdo. Transaction void setNontransactionalRead (   boolean nontransactionalRead ) If true , allow persistent instances to be read without a transaction active. If an implementation does not support this option, a JDOUnsupportedOptionException is thrown. Parameters

javax.jdo.annotations.PersistenceModifier.TRANSACTIONAL

JDO Enum Constant in javax.jdo.annotations.PersistenceModifier TRANSACTIONAL Since: JDO 2.1

Transaction.getRestoreValues() - JDO Method

JDO Method in javax.jdo. Transaction boolean getRestoreValues () Return the current value of the restoreValues property. Return: the value of the restoreValues property Since: JDO 1.0

Transaction.getRetainValues() - JDO Method

JDO Method in javax.jdo. Transaction boolean getRetainValues () If true , at commit time instances retain their field values. Return: the value of the retainValues property Since: JDO 1.0

Transaction.setRetainValues(retainValues) - JDO Method

JDO Method in javax.jdo. Transaction void setRetainValues (   boolean retainValues ) If true , at commit instances retain their values and the instances transition to persistent-nontransactional. If an implementation does not support this option, a JDOUnsupportedOptionException

[ODB1] Chapter 3 - Persistent Classes

when a persistent field is modified during a transaction because the change must be applied to the database when the transaction is committed. ObjectDB must also know when a persistent field is accessed ... to be stored in the database during transaction commit. A possible action is to apply last minute changes

[ODB1] Chapter 4 - JDO Metadata

is always required. persistence-modifier (persistent | none | transactional ) The default rules ... transactional , like f2 above, has similar behavior to transient because its value is never stored in the database. The main difference is that, on transaction rollback, it returns automatically