View Javadoc

1   package com.atlassian.sal.core.transaction;
2   
3   import com.atlassian.sal.api.transaction.TransactionCallback;
4   import com.atlassian.sal.api.transaction.TransactionTemplate;
5   
6   /**
7    * This provides a default implementation that doesn't actually run the action in a transaction at all.
8    * This can be used in applications such as JIRA which don't support transactions.
9    */
10  public class NoOpTransactionTemplate implements TransactionTemplate
11  {
12      public Object execute(TransactionCallback action)
13      {
14          return action.doInTransaction();
15      }
16  }