Author: doogie
Date: Thu Jun 17 20:03:39 2010
New Revision: 955718
URL:
http://svn.apache.org/viewvc?rev=955718&view=revLog:
Applied fix from trunk for revision: 536399
Modified:
ofbiz/branches/release4.0/ (props changed)
ofbiz/branches/release4.0/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 17 20:03:39 2010
@@ -1 +1 @@
-/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168,954956
+/ofbiz/trunk:536399,539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491,808792,814731,827730,890245,942884,943168,954956
Modified: ofbiz/branches/release4.0/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=955718&r1=955717&r2=955718&view=diff==============================================================================
--- ofbiz/branches/release4.0/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/branches/release4.0/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Thu Jun 17 20:03:39 2010
@@ -62,7 +62,7 @@ public class ServiceDispatcher {
public static final String module = ServiceDispatcher.class.getName();
public static final int lruLogSize = 200;
- protected static Map runLog = new LRUMap(lruLogSize);
+ protected static final Map runLog = new LRUMap(lruLogSize);
protected static Map dispatchers = FastMap.newInstance();
protected static boolean enableJM = true;
protected static boolean enableJMS = true;
@@ -916,17 +916,20 @@ public class ServiceDispatcher {
// set up the running service log
RunningService rs = new RunningService(localName, modelService, mode);
if (runLog == null) {
- runLog = new LRUMap(lruLogSize);
- }
- try {
- runLog.put(rs, this);
- } catch (Throwable t) {
- Debug.logWarning("LRUMap problem; resetting LRU [" + runLog.size() + "]", module);
- runLog = new LRUMap(lruLogSize);
- try {
- runLog.put(rs, this);
- } catch (Throwable t2) {
- Debug.logError(t2, "Unable to put() in reset LRU map!", module);
+ Debug.logWarning("LRUMap is null", module);
+ } else {
+ synchronized(runLog) {
+ try {
+ runLog.put(rs, this);
+ } catch (Throwable t) {
+ Debug.logWarning("LRUMap problem; resetting LRU [" + runLog.size() + "]", module);
+ runLog.clear();
+ try {
+ runLog.put(rs, this);
+ } catch (Throwable t2) {
+ Debug.logError(t2, "Unable to put() in reset LRU map!", module);
+ }
+ }
}
}
return rs;