Commit 93a6ff10 authored by afreyssin's avatar afreyssin
Browse files

Bug fix (JORAM-80): the message conversion is now complete, when sending the...

Bug fix (JORAM-80): the message conversion is now complete, when sending the message is prepared and its content is serialized. Before the bridge simply convert the incoming message without finishing its preparation so the body of these messages was empty.
parent b84a646e
......@@ -866,6 +866,13 @@ public class Message implements javax.jms.Message {
return joramMsg;
}
/**
* Prepare a JMS message for sending.
*/
public static void prepareJMSMessage(Message msg) throws JMSException {
msg.prepare();
}
/**
* Method preparing the message for sending; resets header values, and
* serializes the body (done in subclasses).
......
......@@ -213,6 +213,7 @@ public class JMSAcquisition implements AcquisitionDaemon {
org.objectweb.joram.client.jms.Message clientMessage = null;
try {
clientMessage = org.objectweb.joram.client.jms.Message.convertJMSMessage(jmsMessage);
org.objectweb.joram.client.jms.Message.prepareJMSMessage(clientMessage);
} catch (JMSException conversionExc) {
// Conversion error: denying the message.
if (logger.isLoggable(BasicLevel.WARN))
......
......@@ -307,6 +307,8 @@ public class JMSBridgeModule implements javax.jms.ExceptionListener,
if (msg != null) {
org.objectweb.joram.client.jms.Message clientMessage =
org.objectweb.joram.client.jms.Message.convertJMSMessage(msg);
org.objectweb.joram.client.jms.Message.prepareJMSMessage(clientMessage);
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "receiveNoWait: clientMessage=" + clientMessage);
......@@ -531,6 +533,8 @@ public class JMSBridgeModule implements javax.jms.ExceptionListener,
}
org.objectweb.joram.client.jms.Message clientMessage =
org.objectweb.joram.client.jms.Message.convertJMSMessage(jmsMessage);
org.objectweb.joram.client.jms.Message.prepareJMSMessage(clientMessage);
Message momMessage = clientMessage.getMomMsg();
if (isXA) {
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment