cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r767187 - /cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Date Tue, 21 Apr 2009 15:25:34 GMT
Author: dkulp
Date: Tue Apr 21 15:25:34 2009
New Revision: 767187

URL: http://svn.apache.org/viewvc?rev=767187&view=rev
Log:
Stop creating interceptors for everyt request

Modified:
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java?rev=767187&r1=767186&r2=767187&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Tue Apr 21 15:25:34 2009
@@ -22,7 +22,6 @@
 import java.net.HttpURLConnection;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -92,14 +91,17 @@
 
     private Bus bus;
     private InterceptorProvider iProvider;
-    private Class<T> cl;
+    private final Class<T> cl;
     private Executor executor;
     private JAXBContext context;
-    private Service.Mode mode;
+    private final Service.Mode mode;
 
     private ConduitSelector conduitSelector;
+    private final DispatchOutDatabindingInterceptor outInterceptor;
+    private final DispatchInDatabindingInterceptor inInterceptor;
     
-    DispatchImpl(Bus b, Client client, Service.Mode m, JAXBContext ctx, Class<T> clazz,
Executor e) {
+    DispatchImpl(Bus b, Client client, Service.Mode m,
+                 JAXBContext ctx, Class<T> clazz, Executor e) {
         super((JaxWsEndpointImpl)client.getEndpoint());
         bus = b;
         this.iProvider = client;
@@ -109,6 +111,8 @@
         mode = m;
         getConduitSelector().setEndpoint(client.getEndpoint());
         setupEndpointAddressContext(client.getEndpoint());
+        outInterceptor = new DispatchOutDatabindingInterceptor(mode);
+        inInterceptor = new DispatchInDatabindingInterceptor(cl, mode);
     }
     
     DispatchImpl(Bus b, Client cl, Service.Mode m, Class<T> clazz, Executor e) {
@@ -301,7 +305,7 @@
 
         chain.add(new MessageSenderInterceptor());
 
-        chain.add(new DispatchOutDatabindingInterceptor(mode));
+        chain.add(outInterceptor);
         return chain;
     }
 
@@ -336,9 +340,7 @@
             chain.add(slhi);
         }
 
-        List<Interceptor> inInterceptors = new ArrayList<Interceptor>();
-        inInterceptors.add(new DispatchInDatabindingInterceptor(cl, mode));
-        chain.add(inInterceptors);
+        chain.add(inInterceptor);
 
         // execute chain
         Bus origBus = BusFactory.getThreadDefaultBus(false);



Mime
View raw message