See the WebSphere eXtreme Scale Wiki for links to eXtreme Scale Version 7.0 documentation.
If you log in
with your developerWorks ID, you can leave comments and feedback for the development team.
An EntityTransaction is associated with an EntityManager and is used to demarcate a transaction.
Use the EntityManager.getTransaction() method to retreive the EntityManager's EntityTransaction instance.
Each EntityManager and EntityTransaction are associated with the ObjectGrid Session. Transaction demarcation can be performed using either the EntityTransaction or ObjectGrid Session. Methods on the EntityTransaction interface do not have any checked exception. Only RuntimeExceptions of type PersistenceException or its sub classes are thrown.
EntityTransaction interface is contained in package com.ibm.websphere.objectgrid.em. The following methods are defined on this interface.
public void begin();
Begins a new transaction. Can throw IllegalStateException or PersistenceException.
public void commit()
Commit the current transaction, flushing any uncommitted changes in the EntityManager's context to the cache.
public void rollback()
Rolls back the current transaction.
public boolean isActive();
Indicate whether a transaction is in progress.
public void setRollbackOnly();
Mark the current transaction so that the only possible outcome of
the transaction is for the transaction to be rolled back.
public boolean getRollbackOnly();
Determine whether the current transaction has been marked for rollback.
© Copyright IBM Corporation 2007,2009. All Rights Reserved.