com.atlassian.sal.api.transaction
Interface TransactionTemplate


public interface TransactionTemplate

This allows applications greater control over the transaction in which operations may be executed. This really mimicks org.springframework.transaction.support.TransactionTemplate, however since JIRA doesn't know about Spring and doesn't support transactions we need to have our own implementation of this interface here.

Since:
2.0

Method Summary
<T> T
execute(TransactionCallback<T> action)
          Executes the callback, returning the object returned.
 

Method Detail

execute

<T> T execute(TransactionCallback<T> action)
Executes the callback, returning the object returned. Any runtime exceptions thrown by the callback are assumed to rollback the transaction.

Parameters:
action - The callback
Returns:
The object returned from the callback


Copyright © 2011 Atlassian. All Rights Reserved.