activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-2023 Fix missing setEnable1x methods
Date Fri, 17 Aug 2018 15:02:25 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0dff36e00 -> 29f948396


ARTEMIS-2023 Fix missing setEnable1x methods


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

Branch: refs/heads/master
Commit: 3952bcdbe8b383901fc500a146673ae5facbeee3
Parents: 0dff36e
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Fri Aug 17 15:55:39 2018 +0100
Committer: Justin Bertram <jbertram@apache.org>
Committed: Fri Aug 17 10:02:07 2018 -0500

----------------------------------------------------------------------
 .../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/3952bcdb/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/3952bcdb/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