servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r749929 - /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
Date Wed, 04 Mar 2009 07:14:19 GMT
Author: ffang
Date: Wed Mar  4 07:14:18 2009
New Revision: 749929

URL: http://svn.apache.org/viewvc?rev=749929&view=rev
Log:
[SMXCOMP-470]we need cache attachment earlier when use ws-addressing and mtom

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java?rev=749929&r1=749928&r2=749929&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
Wed Mar  4 07:14:18 2009
@@ -19,6 +19,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
 
+import org.apache.cxf.attachment.LazyAttachmentCollection;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapBodyInfo;
 import org.apache.cxf.endpoint.Endpoint;
@@ -44,6 +45,7 @@
     }
 
     public void handleMessage(Message message) {
+        loadAttachments(message);
         if (isGET(message)) {
             return;
         }
@@ -93,6 +95,14 @@
         }
     }
 
+    private void loadAttachments(Message message) {
+        //get chance to cache the attachments
+        if (message.getAttachments() != null) {
+            LazyAttachmentCollection attachments = (LazyAttachmentCollection) message.getAttachments();
+            attachments.size();
+        }
+    }
+
     protected DepthXMLStreamReader getXMLStreamReader(Message message) {
         
         XMLStreamReader xr = message.getContent(XMLStreamReader.class);



Mime
View raw message