Author: jonesde
Date: Sun Apr 19 06:51:33 2009 New Revision: 766430 URL: http://svn.apache.org/viewvc?rev=766430&view=rev Log: Applied fix from trunk for revision: 766429 Modified: ofbiz/branches/release09.04/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Modified: ofbiz/branches/release09.04/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=766430&r1=766429&r2=766430&view=diff ============================================================================== --- ofbiz/branches/release09.04/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original) +++ ofbiz/branches/release09.04/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Sun Apr 19 06:51:33 2009 @@ -21,14 +21,24 @@ import java.sql.Connection; import java.sql.SQLException; import java.sql.Timestamp; +import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; + import javax.sql.XAConnection; -import javax.transaction.*; +import javax.transaction.HeuristicMixedException; +import javax.transaction.HeuristicRollbackException; +import javax.transaction.InvalidTransactionException; +import javax.transaction.NotSupportedException; +import javax.transaction.RollbackException; +import javax.transaction.Status; +import javax.transaction.Synchronization; +import javax.transaction.SystemException; +import javax.transaction.Transaction; +import javax.transaction.TransactionManager; +import javax.transaction.UserTransaction; import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; @@ -49,14 +59,14 @@ public class TransactionUtil implements Status { // Debug module name public static final String module = TransactionUtil.class.getName(); - public static Map<Xid, DebugXaResource> debugResMap = new HashMap<Xid, DebugXaResource>(); + public static Map<Xid, DebugXaResource> debugResMap = Collections.<Xid, DebugXaResource>synchronizedMap(new HashMap<Xid, DebugXaResource>()); public static boolean debugResources = true; private static ThreadLocal<List<Transaction>> suspendedTxStack = new ThreadLocal<List<Transaction>>(); private static ThreadLocal<Exception> transactionBeginStack = new ThreadLocal<Exception>(); private static ThreadLocal<List<Exception>> transactionBeginStackSave = new ThreadLocal<List<Exception>>(); - private static Map<Long, Exception> allThreadsTransactionBeginStack = FastMap.newInstance(); - private static Map<Long, List<Exception>> allThreadsTransactionBeginStackSave = FastMap.newInstance(); + private static Map<Long, Exception> allThreadsTransactionBeginStack = Collections.<Long, Exception>synchronizedMap(FastMap.<Long, Exception>newInstance()); + private static Map<Long, List<Exception>> allThreadsTransactionBeginStackSave = Collections.<Long, List<Exception>>synchronizedMap(FastMap.<Long, List<Exception>>newInstance()); private static ThreadLocal<RollbackOnlyCause> setRollbackOnlyCause = new ThreadLocal<RollbackOnlyCause>(); private static ThreadLocal<List<RollbackOnlyCause>> setRollbackOnlyCauseSave = new ThreadLocal<List<RollbackOnlyCause>>(); private static ThreadLocal<Timestamp> transactionStartStamp = new ThreadLocal<Timestamp>(); |
Free forum by Nabble | Edit this page |