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

    Modifier and Type
    Method
    Description
    <T> T
    Executes the callback, returning the object returned.
  • Method Details

    • 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