Interface TransactionListener

All Superinterfaces:
CacheCallback, Declarable
All Known Implementing Classes:
TransactionListenerAdapter

public interface TransactionListener extends CacheCallback

A listener that can be implemented to handle transaction related events. The methods on TransactionListener are invoked synchronously after the operation, commit or rollback, completes. The transaction that causes the listener to be called will no longer exist at the time the listener code executes. The thread that performed the transaction operation will not see that operation complete until the listener method completes its execution.

Multiple transactions, on the same cache, can cause concurrent invocation of TransactionListener methods. Any exceptions thrown by the listener are caught and logged.

Rollback and failed commit operations are local.

WARNING: To avoid risk of deadlock, do not invoke CacheFactory.getAnyInstance() from within any callback methods. Instead use TransactionEvent.getCache().

Since:
GemFire 4.0
See Also: