cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/5] git commit: [CXF-6038] Only add the handler interceptors once This closes #26
Date Tue, 21 Oct 2014 20:22:08 GMT
[CXF-6038] Only add the handler interceptors once
This closes #26

Signed-off-by: Daniel Kulp <dkulp@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/00636b59
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/00636b59
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/00636b59

Branch: refs/heads/2.7.x-fixes
Commit: 00636b5987466ef8ab5e901fa0efc701bb124090
Parents: 6d4746a
Author: Kyle Lape <kyle.lape@redhat.com>
Authored: Fri Oct 10 14:34:07 2014 -0700
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Oct 21 16:21:50 2014 -0400

----------------------------------------------------------------------
 .../apache/cxf/jaxws/support/JaxWsEndpointImpl.java    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/00636b59/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
index 0b2a4eb..add48bb 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsEndpointImpl.java
@@ -123,6 +123,7 @@ public class JaxWsEndpointImpl extends EndpointImpl {
     private SOAPHandlerFaultOutInterceptor soapFaultOutInterceptor;
     private LogicalHandlerFaultInInterceptor logicalFaultInInterceptor;
     private SOAPHandlerFaultInInterceptor soapFaultInInterceptor;
+    private boolean handlerInterceptorsAdded;
         
     public JaxWsEndpointImpl(Bus bus, Service s, EndpointInfo ei) throws EndpointException
{
         this(bus, s, ei, null, null, null, true);
@@ -534,6 +535,12 @@ public class JaxWsEndpointImpl extends EndpointImpl {
     }
 
     public void addHandlerInterceptors() {
+        if (handlerInterceptorsAdded) {
+            return;
+        } 
+
+        handlerInterceptorsAdded = true;
+
         List<Interceptor<? extends Message>> in = super.getInInterceptors();
      
         List<Interceptor<? extends Message>> out = super.getOutInterceptors();
         List<Interceptor<? extends Message>> outFault = super.getOutFaultInterceptors();
   
@@ -555,6 +562,12 @@ public class JaxWsEndpointImpl extends EndpointImpl {
         }
     }
     public void removeHandlerInterceptors() {
+        if (!handlerInterceptorsAdded) {
+            return;
+        }
+
+        handlerInterceptorsAdded = false;
+
         List<Interceptor<? extends Message>> in = super.getInInterceptors();
      
         List<Interceptor<? extends Message>> out = super.getOutInterceptors();
         List<Interceptor<? extends Message>> outFault = super.getOutFaultInterceptors();
   


Mime
View raw message