View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.api.transaction;
8   
9   import org.mule.api.MuleContext;
10  
11  
12  /**
13   * <code>TransactionFactory</code> creates a transaction.
14   */
15  public interface TransactionFactory
16  {
17      /**
18       * Create and begins a new transaction
19       * 
20       * @return a new Transaction
21       * @throws TransactionException if the transaction cannot be created or begun
22       * @param muleContext
23       */
24      Transaction beginTransaction(MuleContext muleContext) throws TransactionException;
25  
26      /**
27       * Determines whether this transaction factory creates transactions that are
28       * really transacted or if they are being used to simulate batch actions, such as
29       * using Jms Client Acknowledge.
30       */
31      boolean isTransacted();
32  }