Commit in servicemix/base/src/main/java/org/servicemix on MAIN
client/DefaultMarshaler.java+13-71.5 -> 1.6
_expression_/_expression_.java+2-21.1 -> 1.2
+15-9
2 modified files
avoided keeping around stale StreamSource objects if they are passed in to the client as the payload

servicemix/base/src/main/java/org/servicemix/client
DefaultMarshaler.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- DefaultMarshaler.java	22 Jun 2005 16:40:12 -0000	1.5
+++ DefaultMarshaler.java	23 Sep 2005 14:21:43 -0000	1.6
@@ -27,10 +27,11 @@
 import javax.xml.transform.dom.DOMSource;
 
 /**
- * Default implementation of [EMAIL PROTECTED] Marshaler} which will pass through String objects
- * as XML content, DOM objects or Stream objects, otherwise the payload is stored in a message property.
- *
- * @version $Revision: 1.5 $
+ * Default implementation of [EMAIL PROTECTED] Marshaler} which will pass through String
+ * objects as XML content, DOM objects or Stream objects, otherwise the payload
+ * is stored in a message property.
+ * 
+ * @version $Revision: 1.6 $
  */
 public class DefaultMarshaler implements Marshaler {
 
@@ -48,9 +49,14 @@
     }
 
     public void marshal(MessageExchange exchange, NormalizedMessage message, Object body) throws MessagingException {
-        message.setProperty(BODY, body);
-        Source content = asContent(message, body);
-        message.setContent(content);
+        if (body instanceof Source) {
+            message.setContent((Source) body);
+        }
+        else {
+            message.setProperty(BODY, body);
+            Source content = asContent(message, body);
+            message.setContent(content);
+        }
     }
 
     public Object unmarshal(MessageExchange exchange, NormalizedMessage message) throws MessagingException {

servicemix/base/src/main/java/org/servicemix/_expression_
_expression_.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- _expression_.java	14 Jul 2005 15:19:19 -0000	1.1
+++ _expression_.java	23 Sep 2005 14:21:43 -0000	1.2
@@ -20,11 +20,11 @@
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.messaging.MessagingException;
-
+ 
 /**
  * An _expression_ strategy for extracting or calculating some value from a message.
  *
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
  */
 public interface _expression_ {
 
CVSspam 0.2.8



Reply via email to