You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2008/01/30 14:50:11 UTC
svn commit: r616761 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
Author: dims
Date: Wed Jan 30 05:50:03 2008
New Revision: 616761
URL: http://svn.apache.org/viewvc?rev=616761&view=rev
Log:
Fix for AXIS2-3484 - The ConfigurationContext in Axis2-Kernal causes ConcurrentModificationException in Session-Scope and thus is not multithreading-able
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=616761&r1=616760&r2=616761&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Wed Jan 30 05:50:03 2008
@@ -661,16 +661,19 @@
return;
}
long currentTime = new Date().getTime();
- for (Iterator sgCtxtMapKeyIter = serviceGroupContextMap.keySet().iterator();
- sgCtxtMapKeyIter.hasNext();) {
- String sgCtxtId = (String) sgCtxtMapKeyIter.next();
- ServiceGroupContext serviceGroupContext =
- (ServiceGroupContext) serviceGroupContextMap.get(sgCtxtId);
- if ((currentTime - serviceGroupContext.getLastTouchedTime()) >
- getServiceGroupContextTimoutInterval()) {
- sgCtxtMapKeyIter.remove();
- cleanupServiceContexts(serviceGroupContext);
- contextRemoved(serviceGroupContext);
+
+ synchronized (serviceGroupContextMap) {
+ for (Iterator sgCtxtMapKeyIter = serviceGroupContextMap.keySet().iterator();
+ sgCtxtMapKeyIter.hasNext();) {
+ String sgCtxtId = (String) sgCtxtMapKeyIter.next();
+ ServiceGroupContext serviceGroupContext =
+ (ServiceGroupContext) serviceGroupContextMap.get(sgCtxtId);
+ if ((currentTime - serviceGroupContext.getLastTouchedTime()) >
+ getServiceGroupContextTimoutInterval()) {
+ sgCtxtMapKeyIter.remove();
+ cleanupServiceContexts(serviceGroupContext);
+ contextRemoved(serviceGroupContext);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org