activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-2023 Fix missing setEnable1x methods
Date Fri, 17 Aug 2018 15:45:32 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 8824053a2 -> ace575ec6


ARTEMIS-2023 Fix missing setEnable1x methods

(cherry picked from commit 3952bcdbe8b383901fc500a146673ae5facbeee3)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ace575ec
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ace575ec
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ace575ec

Branch: refs/heads/2.6.x
Commit: ace575ec64c2982360adfbc55ba4be71010cf711
Parents: 8824053
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Fri Aug 17 15:55:39 2018 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Aug 17 11:45:26 2018 -0400

----------------------------------------------------------------------
 .../artemis/jms/client/ActiveMQSession.java     | 26 ++++++++++++++------
 .../ra/inflow/ActiveMQMessageHandler.java       |  2 ++
 2 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ace575ec/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
index 278b429..528310f 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
@@ -144,28 +144,36 @@ public class ActiveMQSession implements QueueSession, TopicSession {
    public BytesMessage createBytesMessage() throws JMSException {
       checkClosed();
 
-      return new ActiveMQBytesMessage(session);
+      ActiveMQBytesMessage message = new ActiveMQBytesMessage(session);
+      message.setEnable1xPrefixes(enable1xPrefixes);
+      return message;
    }
 
    @Override
    public MapMessage createMapMessage() throws JMSException {
       checkClosed();
 
-      return new ActiveMQMapMessage(session);
+      ActiveMQMapMessage message = new ActiveMQMapMessage(session);
+      message.setEnable1xPrefixes(enable1xPrefixes);
+      return message;
    }
 
    @Override
    public Message createMessage() throws JMSException {
       checkClosed();
 
-      return new ActiveMQMessage(session);
+      ActiveMQMessage message = new ActiveMQMessage(session);
+      message.setEnable1xPrefixes(enable1xPrefixes);
+      return message;
    }
 
    @Override
    public ObjectMessage createObjectMessage() throws JMSException {
       checkClosed();
 
-      return new ActiveMQObjectMessage(session, options);
+      ActiveMQObjectMessage message = new ActiveMQObjectMessage(session, options);
+      message.setEnable1xPrefixes(enable1xPrefixes);
+      return message;
    }
 
    @Override
@@ -173,8 +181,8 @@ public class ActiveMQSession implements QueueSession, TopicSession {
       checkClosed();
 
       ActiveMQObjectMessage msg = new ActiveMQObjectMessage(session, options);
-
       msg.setObject(object);
+      msg.setEnable1xPrefixes(enable1xPrefixes);
 
       return msg;
    }
@@ -183,7 +191,9 @@ public class ActiveMQSession implements QueueSession, TopicSession {
    public StreamMessage createStreamMessage() throws JMSException {
       checkClosed();
 
-      return new ActiveMQStreamMessage(session);
+      ActiveMQStreamMessage message = new ActiveMQStreamMessage(session);
+      message.setEnable1xPrefixes(enable1xPrefixes);
+      return message;
    }
 
    @Override
@@ -191,8 +201,8 @@ public class ActiveMQSession implements QueueSession, TopicSession {
       checkClosed();
 
       ActiveMQTextMessage msg = new ActiveMQTextMessage(session);
-
       msg.setText(null);
+      msg.setEnable1xPrefixes(enable1xPrefixes);
 
       return msg;
    }
@@ -202,8 +212,8 @@ public class ActiveMQSession implements QueueSession, TopicSession {
       checkClosed();
 
       ActiveMQTextMessage msg = new ActiveMQTextMessage(session);
-
       msg.setText(text);
+      msg.setEnable1xPrefixes(enable1xPrefixes);
 
       return msg;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ace575ec/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
index 2de6988..33c6445 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
@@ -282,6 +282,8 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
       }
 
       ActiveMQMessage msg = ActiveMQMessage.createMessage(message, session, options);
+      msg.setEnable1xPrefixes(activation.getConnectionFactory().isEnable1xPrefixes());
+
       boolean beforeDelivery = false;
 
       try {


Mime
View raw message