cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1133009 - in /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors: HolderOutInterceptor.java Messages.properties
Date Tue, 07 Jun 2011 13:43:54 GMT
Author: ningjiang
Date: Tue Jun  7 13:43:53 2011
New Revision: 1133009

URL: http://svn.apache.org/viewvc?rev=1133009&view=rev
Log:
CXF-3572 Add a check of the message content list to avoid the OoM error from the HolderOutInterceptor

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/Messages.properties

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java?rev=1133009&r1=1133008&r2=1133009&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
Tue Jun  7 13:43:53 2011
@@ -72,11 +72,15 @@ public class HolderOutInterceptor extend
             List<MessagePartInfo> parts = op.getOutput().getMessageParts();
             MessageContentsList inObjects = MessageContentsList.getContentsList(exchange.getInMessage());
             if (inObjects != null) {
-                for (int x = 0; x < inObjects.size(); x++) {
-                    Object o = inObjects.get(x);
-                    if (o instanceof Holder) {
-                        outObjects.set(x + 1, o);
+                if (!inObjects.equals(outObjects)) {
+                    for (int x = 0; x < inObjects.size(); x++) {
+                        Object o = inObjects.get(x);
+                        if (o instanceof Holder) {
+                            outObjects.set(x + 1, o);
+                        }
                     }
+                } else {
+                    LOG.severe("CANNOT_SET_HOLDER_OBJECTS");
                 }
             }
             for (MessagePartInfo part : parts) {

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/Messages.properties?rev=1133009&r1=1133008&r2=1133009&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/Messages.properties
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/Messages.properties
Tue Jun  7 13:43:53 2011
@@ -27,3 +27,4 @@ ATTACHMENT_NOT_SUPPORTED = Attachments o
 DISPATCH_OBJECT_NOT_SUPPORTED_SOAPBINDING = {0} is not valid in {1} mode with SOAP/HTTP binding.
 DISPATCH_OBJECT_NOT_SUPPORTED_XMLBINDING = {0} is not valid in {1} mode with XML/HTTP binding.
 EXCEPTION_WHILE_WRITING_FAULT = Exception occurred while writing fault.
+CANNOT_SET_HOLDER_OBJECTS = The message content list of the in message and out message are
same, CXF can't set the holder object into the message content list of the out message.
\ No newline at end of file



Mime
View raw message