1   /*
2    * $Id: TestTransactionFactory.java 11567 2008-04-11 13:08:05Z 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.tck.testmodels.mule;
12  
13  import org.mule.api.MuleContext;
14  import org.mule.api.transaction.Transaction;
15  import org.mule.api.transaction.TransactionException;
16  import org.mule.api.transaction.TransactionFactory;
17  
18  /**
19   * <code>TestTransactionFactory</code> creates a {@link org.mule.tck.testmodels.mule.TestTransaction}
20   * 
21   */
22  
23  public class TestTransactionFactory implements TransactionFactory
24  {
25  
26      // for testsing properties
27      private String value;
28  
29      public Transaction beginTransaction(MuleContext muleContext) throws TransactionException
30      {
31          return new TestTransaction();
32      }
33  
34      public boolean isTransacted()
35      {
36          return true;
37      }
38  
39      public String getValue()
40      {
41          return value;
42      }
43  
44      public void setValue(String value)
45      {
46          this.value = value;
47      }
48  
49  }