1 10 11 package org.mule.extras.jotm; 12 13 import org.mule.umo.manager.UMOTransactionManagerFactory; 14 import org.objectweb.jotm.Current; 15 import org.objectweb.jotm.Jotm; 16 17 import javax.transaction.TransactionManager ; 18 19 28 public class JotmTransactionManagerFactory implements UMOTransactionManagerFactory 29 { 30 private TransactionManager jotmCurrent; 31 32 public JotmTransactionManagerFactory() 33 { 34 super(); 35 } 36 37 43 public synchronized TransactionManager create() throws Exception 44 { 45 if (jotmCurrent == null) 46 { 47 jotmCurrent = Current.getCurrent(); 49 if (jotmCurrent == null) 51 { 52 jotmCurrent = new Jotm(true, false).getTransactionManager(); 53 } 54 } 55 return jotmCurrent; 56 } 57 58 } 59 | Popular Tags |