1 10 11 package org.mule.transaction; 12 13 import org.mule.config.i18n.Message; 14 import org.mule.config.i18n.Messages; 15 import org.mule.umo.TransactionException; 16 import org.mule.umo.UMOTransaction; 17 import org.mule.umo.UMOTransactionFactory; 18 19 23 public class XaTransactionFactory implements UMOTransactionFactory 24 { 25 26 public XaTransactionFactory() 27 { 28 super(); 29 } 30 31 public UMOTransaction beginTransaction() throws TransactionException 32 { 33 try 34 { 35 XaTransaction xat = new XaTransaction(); 36 xat.begin(); 37 return xat; 38 } 39 catch (Exception e) 40 { 41 throw new TransactionException(new Message(Messages.TX_CANT_START_X_TRANSACTION, "XA"), e); 42 } 43 } 44 45 52 public boolean isTransacted() 53 { 54 return true; 55 } 56 } 57 | Popular Tags |