01: /*
02: * $Id: JmsTransactionFactory.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.transport.jms;
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: * <p>
20: * <code>JmsTransactionFactory</code> creates a JMS local transaction
21: */
22: public class JmsTransactionFactory implements TransactionFactory {
23: private String name;
24:
25: /*
26: * (non-Javadoc)
27: *
28: * @see org.mule.api.TransactionFactory#beginTransaction(org.mule.api.transport.MessageDispatcher)
29: */
30: public Transaction beginTransaction(MuleContext muleContext)
31: throws TransactionException {
32: JmsTransaction tx = new JmsTransaction();
33: tx.begin();
34: return tx;
35: }
36:
37: public boolean isTransacted() {
38: return true;
39: }
40:
41: public String getName() {
42: return name;
43: }
44:
45: public void setName(String name) {
46: this.name = name;
47: }
48: }
|