summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-jms-runtime/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms-runtime/src/main')
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/BytesMessageProcessor.java1
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultMessageProcessor.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/BytesMessageProcessor.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/BytesMessageProcessor.java
index b2f5102bb7..6ffbabd2b0 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/BytesMessageProcessor.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/BytesMessageProcessor.java
@@ -71,6 +71,7 @@ public class BytesMessageProcessor extends AbstractMessageProcessor {
long noOfBytes = ((BytesMessage)msg).getBodyLength();
byte [] bytes = new byte[(int)noOfBytes];
((BytesMessage)msg).readBytes(bytes);
+ ((BytesMessage)msg).reset();
return bytes;
} catch (JMSException e) {
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultMessageProcessor.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultMessageProcessor.java
index 848986f8b1..05f264db78 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultMessageProcessor.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/DefaultMessageProcessor.java
@@ -186,7 +186,8 @@ public class DefaultMessageProcessor extends AbstractMessageProcessor {
long noOfBytes = ((BytesMessage) msg).getBodyLength();
byte[] bytes = new byte[(int) noOfBytes];
((BytesMessage) msg).readBytes(bytes);
-
+ ((BytesMessage)msg).reset();
+
if ((bytes != null) && (bytes.length > 0)) {
XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new ByteArrayInputStream(bytes));
StAXOMBuilder builder = new StAXOMBuilder(reader);