IBM WebSphere® DataPower® XC10 Appliance
Release 2.1 Client API Specification

com.ibm.websphere.objectgrid.plugins
Interface TransactionCallback.BeforeCommit

All Superinterfaces:
TransactionCallback
Enclosing interface:
TransactionCallback

public static interface TransactionCallback.BeforeCommit
extends TransactionCallback

The BeforeCommit optional mix-in interface for the TransactionCallback plug-in interface allows plug-ins to be notified at the beginning of a Session.commit(). Implementations can use the beforeCommit() method to validate changed data in the transaction and modify the data.

Since:
7.1.1

Nested Class Summary
static interface TransactionCallback.BeforeCommit.TransactionContext
          The TransactionContext identifies various information that's available to the beforeCommit() method.
 
Nested classes/interfaces inherited from interface com.ibm.websphere.objectgrid.plugins.TransactionCallback
TransactionCallback.BeforeCommit
 
Method Summary
 void beforeCommit(TransactionCallback.BeforeCommit.TransactionContext ctx)
          Invoked at the beginning of a Session.commit().
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.TransactionCallback
begin, commit, initialize, isExternalTransactionActive, rollback
 

Method Detail

beforeCommit

void beforeCommit(TransactionCallback.BeforeCommit.TransactionContext ctx)
                  throws TransactionCallbackException
Invoked at the beginning of a Session.commit().

Use the TransactionContext.getLogSequences() method to retrieve the changes made by this transaction. Use the TransactionContext.getTxId().getSession() methods to access the Session. The Session can be used to access ObjectMaps and modify data in the current transaction.

Parameters:
ctx - the context of the transaction.
Throws:
TransactionCallbackException - if an error occurs during processing. Any exception will roll back the transaction and will be included in the TransactionException thrown to the caller.
See Also:
Session.commit(), TxID

IBM WebSphere® DataPower® XC10 Appliance
Release 2.1 Client API Specification

© Copyright International Business Machines Corp 2005,2011. All rights reserved.