01: /*
02: * $Id: TransactionFactory.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.transaction;
12:
13: import org.mule.api.MuleContext;
14:
15: /**
16: * <code>TransactionFactory</code> creates a transaction.
17: *
18: */
19: public interface TransactionFactory {
20: /**
21: * Create and begins a new transaction
22: *
23: * @return a new Transaction
24: * @throws TransactionException if the transaction cannot be created or begun
25: * @param muleContext
26: */
27: Transaction beginTransaction(MuleContext muleContext)
28: throws TransactionException;
29:
30: /**
31: * Determines whether this transaction factory creates transactions that are
32: * really transacted or if they are being used to simulate batch actions, such as
33: * using Jms Client Acknowledge.
34: *
35: * @return
36: */
37: boolean isTransacted();
38: }
|