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