View Javadoc

1   /*
2    * $Id: UMOTransactionConfig.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.umo;
12  
13  import org.mule.transaction.constraints.ConstraintFilter;
14  
15  /**
16   * <code>UMOTransactionConfig</code> defines transaction configuration for a
17   * transactional endpoint.
18   */
19  public interface UMOTransactionConfig
20  {
21      /** Whether there is a transaction available or not, ignore it */
22      byte ACTION_NONE = 0;
23  
24      /** Will ensure that a new transaction is created for each invocation */
25      byte ACTION_ALWAYS_BEGIN = 1;
26  
27      /** Will begin a new transaction if no transaction is already present */
28      byte ACTION_BEGIN_OR_JOIN = 2;
29  
30      /** There must always be a transaction present for the invocation */
31      byte ACTION_ALWAYS_JOIN = 3;
32  
33      /** If there is a transaction available, then use it, otherwise continue processing */
34      byte ACTION_JOIN_IF_POSSIBLE = 4;
35  
36      UMOTransactionFactory getFactory();
37  
38      void setFactory(UMOTransactionFactory factory);
39  
40      byte getAction();
41  
42      void setAction(byte action);
43  
44      boolean isTransacted();
45  
46      ConstraintFilter getConstraint();
47  
48      void setConstraint(ConstraintFilter constraint);
49  
50      void setTimeout(int timeout);
51  
52      int getTimeout();
53  }