Author: thomas.diesler(a)jboss.com
Date: 2008-02-25 11:22:35 -0500 (Mon, 25 Feb 2008)
New Revision: 5802
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
Log:
[JBWS-1878] ConcurrentModificationException in initHandlerChain()
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2008-02-25
16:07:09 UTC (rev 5801)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2008-02-25
16:22:35 UTC (rev 5802)
@@ -88,10 +88,16 @@
// Initialize the handler chain
if (isInitialized() == false)
{
- initHandlerChain(sepMetaData, HandlerType.PRE);
- initHandlerChain(sepMetaData, HandlerType.ENDPOINT);
- initHandlerChain(sepMetaData, HandlerType.POST);
- setInitialized(true);
+ synchronized (sepMetaData)
+ {
+ if (isInitialized() == false)
+ {
+ initHandlerChain(sepMetaData, HandlerType.PRE);
+ initHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ initHandlerChain(sepMetaData, HandlerType.POST);
+ setInitialized(true);
+ }
+ }
}
boolean status = true;
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-25
16:07:09 UTC (rev 5801)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-25
16:22:35 UTC (rev 5802)
@@ -80,10 +80,16 @@
// Initialize the handler chain
if (isInitialized() == false)
{
- resolver.initHandlerChain(sepMetaData, HandlerType.PRE, true);
- resolver.initHandlerChain(sepMetaData, HandlerType.ENDPOINT, true);
- resolver.initHandlerChain(sepMetaData, HandlerType.POST, true);
- setInitialized(true);
+ synchronized (resolver)
+ {
+ if (isInitialized() == false)
+ {
+ resolver.initHandlerChain(sepMetaData, HandlerType.PRE, true);
+ resolver.initHandlerChain(sepMetaData, HandlerType.ENDPOINT, true);
+ resolver.initHandlerChain(sepMetaData, HandlerType.POST, true);
+ setInitialized(true);
+ }
+ }
}
HandlerChainExecutor executor = createExecutor(sepMetaData, type);