You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/01/17 17:48:30 UTC

[1/3] activemq-artemis git commit: This closes #1778

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 60055d7a0 -> 14f149d75


This closes #1778


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

Branch: refs/heads/master
Commit: 14f149d755398d8f9df0687a13299ec2ea0f356a
Parents: 60055d7 86175d6
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Jan 17 12:31:27 2018 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jan 17 12:31:27 2018 -0500

----------------------------------------------------------------------
 .../artemis/jms/client/ActiveMQDestination.java | 51 ++++++++++++---
 .../artemis/jms/client/ActiveMQQueue.java       |  5 ++
 .../artemis/jms/client/ActiveMQTopic.java       |  7 +-
 .../artemis/jms/server/JMSServerManager.java    | 45 ++++++++++++-
 .../jms/server/impl/JMSServerManagerImpl.java   | 68 ++++++++++++++------
 .../src/main/resources/serial/jbmserial.groovy  | 10 +++
 .../src/main/resources/serial/serial.groovy     | 14 +++-
 .../tests/compatibility/SerializationTest.java  |  8 +--
 8 files changed, 169 insertions(+), 39 deletions(-)
----------------------------------------------------------------------



[2/3] activemq-artemis git commit: ARTEMIS-1609 Add distinct name/address for JMS destinations

Posted by cl...@apache.org.
ARTEMIS-1609 Add distinct name/address for JMS destinations

* add methods to JMSServerManager to be able to create JMS queues and topics
  that have distincts names (as returned by the JMS API) and addresses
  (as used by Artemis Core API).

* add constructors to ActiveMQQueue and ActiveMQTopic to specify JMS name
  distinct from their core address

This allows to emulate Artemis 1.x naming conventions where a JMS queue
would have a name 'foo'and and an address 'jms.queue.foo' (the same
applying for JMS topic as well).


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

Branch: refs/heads/master
Commit: 86175d677ad8ff8c292c2343fb4c806514525119
Parents: 1aa7b5c
Author: Jeff Mesnil <jm...@gmail.com>
Authored: Fri Jan 12 11:53:06 2018 +0100
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jan 17 12:31:27 2018 -0500

----------------------------------------------------------------------
 .../artemis/jms/client/ActiveMQDestination.java |  8 +++
 .../artemis/jms/client/ActiveMQQueue.java       |  5 ++
 .../artemis/jms/client/ActiveMQTopic.java       |  7 +-
 .../artemis/jms/server/JMSServerManager.java    | 45 ++++++++++++-
 .../jms/server/impl/JMSServerManagerImpl.java   | 68 ++++++++++++++------
 5 files changed, 109 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/86175d67/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
index 8c7a5a0..a5ab245 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
@@ -198,6 +198,10 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
       return new ActiveMQQueue(address);
    }
 
+   public static ActiveMQQueue createQueue(final String address, final String name) {
+      return new ActiveMQQueue(address, name);
+   }
+
    public static ActiveMQTopic createTopic(final String address) {
       return new ActiveMQTopic(address);
    }
@@ -206,6 +210,10 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
       return new ActiveMQTopic(address);
    }
 
+   public static ActiveMQTopic createTopic(final String address, final String name) {
+      return new ActiveMQTopic(address, name);
+   }
+
    public static ActiveMQTemporaryQueue createTemporaryQueue(final String address, final ActiveMQSession session) {
       return new ActiveMQTemporaryQueue(address, session);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/86175d67/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
index ff4ee0f..f2680f8 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
@@ -47,6 +47,11 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
       super(address, TYPE.QUEUE, null);
    }
 
+   @Deprecated
+   public ActiveMQQueue(final String address, final String name) {
+      super(address, name, TYPE.QUEUE, null);
+   }
+
    public ActiveMQQueue(final String address, boolean temporary) {
       super(address, temporary ? TYPE.TEMP_QUEUE : TYPE.QUEUE, null);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/86175d67/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
index 4dbefec..0a2711c 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
@@ -46,8 +46,13 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
       super(address, TYPE.TOPIC, null);
    }
 
+   @Deprecated
+   public ActiveMQTopic(final String address, final String name) {
+      super(address, name, TYPE.TOPIC, null);
+   }
+
    public ActiveMQTopic(final String address, boolean temporary) {
-      super(address, TYPE.TOPIC, null);
+      this(address, temporary, null);
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/86175d67/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java
index 6df68f3..163b418 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java
@@ -60,6 +60,24 @@ public interface JMSServerManager extends ActiveMQComponent {
                        boolean durable,
                        String... bindings) throws Exception;
 
+   /**
+    * Creates a JMS Queue.
+    *
+    * @param queueName      The name of the core queue to create
+    * @param jmsQueueName the name of this JMS queue
+    * @param selectorString
+    * @param durable
+    * @return true if the queue is created or if it existed and was added to
+    * the Binding Registry
+    * @throws Exception if problems were encountered creating the queue.
+    */
+   boolean createQueue(boolean storeConfig,
+                       String queueName,
+                       String jmsQueueName,
+                       String selectorString,
+                       boolean durable,
+                       String... bindings) throws Exception;
+
    boolean addTopicToBindingRegistry(String topicName, String binding) throws Exception;
 
    boolean addQueueToBindingRegistry(String queueName, String binding) throws Exception;
@@ -69,23 +87,46 @@ public interface JMSServerManager extends ActiveMQComponent {
    /**
     * Creates a JMS Topic
     *
+    * @param address the core addres of thetopic
+    * @param bindings  the names of the binding for the Binding Registry or BindingRegistry
+    * @return true if the topic was created or if it existed and was added to
+    * the Binding Registry
+    * @throws Exception if a problem occurred creating the topic
+    */
+   boolean createTopic(boolean storeConfig, String address, String... bindings) throws Exception;
+
+   /**
+    * Creates a JMS Topic
+    *
+    * @param address the core addres of thetopic
     * @param topicName the name of the topic
     * @param bindings  the names of the binding for the Binding Registry or BindingRegistry
     * @return true if the topic was created or if it existed and was added to
     * the Binding Registry
     * @throws Exception if a problem occurred creating the topic
     */
-   boolean createTopic(boolean storeConfig, String topicName, String... bindings) throws Exception;
+   boolean createTopic(String address, boolean storeConfig, String topicName, String... bindings) throws Exception;
+
+   /**
+    * @param storeConfig
+    * @param address
+    * @param autoCreated
+    * @param bindings
+    * @return
+    * @throws Exception
+    */
+   boolean createTopic(boolean storeConfig, String address, boolean autoCreated, String... bindings) throws Exception;
 
    /**
     * @param storeConfig
+    * @param address
     * @param topicName
     * @param autoCreated
     * @param bindings
     * @return
     * @throws Exception
     */
-   boolean createTopic(boolean storeConfig, String topicName, boolean autoCreated, String... bindings) throws Exception;
+   boolean createTopic(boolean storeConfig, String address, String topicName, boolean autoCreated, String... bindings) throws Exception;
 
    /**
     * Remove the topic from the Binding Registry or BindingRegistry.

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/86175d67/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 8d269ed..15c5896 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -117,8 +117,10 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
 
    private BindingRegistry registry;
 
+   // keys are the core addresses of the JMS queues
    private final Map<String, ActiveMQQueue> queues = new HashMap<>();
 
+   // keys are the core addresses of the topics
    private final Map<String, ActiveMQTopic> topics = new HashMap<>();
 
    private final Map<String, ActiveMQConnectionFactory> connectionFactories = new HashMap<>();
@@ -465,11 +467,17 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
                                            final String selectorString,
                                            final boolean durable,
                                            final String... bindings) throws Exception {
-      return internalCreateJMSQueue(storeConfig, queueName, selectorString, durable, false, bindings);
+      return internalCreateJMSQueue(storeConfig, queueName, queueName, selectorString, durable, false, bindings);
+   }
+
+   @Override
+   public boolean createQueue(boolean storeConfig, String queueName, String jmsQueueName, String selectorString, boolean durable, String... bindings) throws Exception {
+      return internalCreateJMSQueue(storeConfig, queueName, jmsQueueName, selectorString, durable, false, bindings);
    }
 
    protected boolean internalCreateJMSQueue(final boolean storeConfig,
                                             final String queueName,
+                                            final String jmsQueueName,
                                             final String selectorString,
                                             final boolean durable,
                                             final boolean autoCreated,
@@ -489,7 +497,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
          public void runException() throws Exception {
             checkBindings(bindings);
 
-            if (internalCreateQueue(queueName, selectorString, durable, autoCreated)) {
+            if (internalCreateQueue(queueName, jmsQueueName, selectorString, durable, autoCreated)) {
 
                ActiveMQDestination destination = queues.get(queueName);
                if (destination == null) {
@@ -528,32 +536,46 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
 
    @Override
    public synchronized boolean createTopic(final boolean storeConfig,
-                                           final String topicName,
+                                           final String address,
                                            final String... bindings) throws Exception {
-      return createTopic(storeConfig, topicName, false, bindings);
+      return createTopic(storeConfig, address, false, bindings);
+   }
+
+   @Override
+   public boolean createTopic(String address, boolean storeConfig, String topicName, String... bindings) throws Exception {
+      return createTopic(storeConfig, address, topicName, false, bindings);
    }
 
    @Override
    public synchronized boolean createTopic(final boolean storeConfig,
-                                           final String topicName,
+                                           final String address,
                                            final boolean autoCreated,
                                            final String... bindings) throws Exception {
-      if (active && topics.get(topicName) != null) {
+      return createTopic(storeConfig, address, address, autoCreated, bindings);
+   }
+
+   @Override
+   public boolean createTopic(final boolean storeConfig,
+                              final String address,
+                              final String topicName,
+                              final boolean autoCreated,
+                              final String... bindings) throws Exception {
+      if (active && topics.get(address) != null) {
          return false;
       }
 
       runAfterActive(new WrappedRunnable() {
          @Override
          public String toString() {
-            return "createTopic for " + topicName;
+            return "createTopic for " + address;
          }
 
          @Override
          public void runException() throws Exception {
             checkBindings(bindings);
 
-            if (internalCreateTopic(topicName, autoCreated)) {
-               ActiveMQDestination destination = topics.get(topicName);
+            if (internalCreateTopic(address, topicName, autoCreated)) {
+               ActiveMQDestination destination = topics.get(address);
 
                if (destination == null) {
                   // sanity check. internalCreateQueue should already have done this check
@@ -571,17 +593,17 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
                }
 
                String[] usedBindings = bindingsToAdd.toArray(new String[bindingsToAdd.size()]);
-               addToBindings(topicBindings, topicName, usedBindings);
+               addToBindings(topicBindings, address, usedBindings);
 
                if (storeConfig) {
-                  storage.storeDestination(new PersistedDestination(PersistedType.Topic, topicName));
-                  storage.addBindings(PersistedType.Topic, topicName, usedBindings);
+                  storage.storeDestination(new PersistedDestination(PersistedType.Topic, address));
+                  storage.addBindings(PersistedType.Topic, address, usedBindings);
                }
             }
          }
       });
 
-      sendNotification(JMSNotificationType.TOPIC_CREATED, topicName);
+      sendNotification(JMSNotificationType.TOPIC_CREATED, address);
       return true;
 
    }
@@ -1056,10 +1078,11 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
    private synchronized boolean internalCreateQueue(final String queueName,
                                                     final String selectorString,
                                                     final boolean durable) throws Exception {
-      return internalCreateQueue(queueName, selectorString, durable, false);
+      return internalCreateQueue(queueName, queueName, selectorString, durable, false);
    }
 
    private synchronized boolean internalCreateQueue(final String queueName,
+                                                    final String jmsQueueName,
                                                     final String selectorString,
                                                     final boolean durable,
                                                     final boolean autoCreated) throws Exception {
@@ -1078,7 +1101,8 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
          AddressSettings as = server.getAddressSettingsRepository().getMatch(queueName);
          server.createQueue(SimpleString.toSimpleString(queueName), RoutingType.ANYCAST, SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(coreFilterString), null, durable, false, true, false, false, as.getDefaultMaxConsumers(), as.isDefaultPurgeOnNoConsumers(), as.isAutoCreateAddresses());
 
-         queues.put(queueName, ActiveMQDestination.createQueue(queueName));
+         // create the JMS queue with the logical name jmsQueueName and keeps queueName for its *core* queue name
+         queues.put(queueName, ActiveMQDestination.createQueue(queueName, jmsQueueName));
 
          this.recoverregistryBindings(queueName, PersistedType.Queue);
 
@@ -1090,21 +1114,23 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
     * Performs the internal creation without activating any storage.
     * The storage load will call this method
     *
-    * @param topicName
+    * @param address
     * @return
     * @throws Exception
     */
-   private synchronized boolean internalCreateTopic(final String topicName) throws Exception {
-      return internalCreateTopic(topicName, false);
+   private synchronized boolean internalCreateTopic(final String address) throws Exception {
+      return internalCreateTopic(address, address, false);
    }
 
-   private synchronized boolean internalCreateTopic(final String topicName,
+   private synchronized boolean internalCreateTopic(final String address,
+                                                    final String topicName,
                                                     final boolean autoCreated) throws Exception {
 
-      if (topics.get(topicName) != null) {
+      if (topics.get(address) != null) {
          return false;
       } else {
-         ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(topicName);
+         // Create the JMS topic with topicName as the logical name of the topic *and* address as its address
+         ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(address, topicName);
          server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(activeMQTopic.getAddress()), RoutingType.MULTICAST));
 
          topics.put(topicName, activeMQTopic);


[3/3] activemq-artemis git commit: ARTEMIS-1609 fix JMS destination s11n compatibility

Posted by cl...@apache.org.
ARTEMIS-1609 fix JMS destination s11n compatibility


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

Branch: refs/heads/master
Commit: 1aa7b5c038c3791f5dd0e7fdc859d74a63b8d76d
Parents: 60055d7
Author: Justin Bertram <jb...@apache.org>
Authored: Tue Jan 16 09:15:00 2018 -0600
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jan 17 12:31:27 2018 -0500

----------------------------------------------------------------------
 .../artemis/jms/client/ActiveMQDestination.java | 43 ++++++++++++++++----
 .../src/main/resources/serial/jbmserial.groovy  | 10 +++++
 .../src/main/resources/serial/serial.groovy     | 14 ++++++-
 .../tests/compatibility/SerializationTest.java  |  8 ++--
 4 files changed, 60 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1aa7b5c0/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
index 7750564..8c7a5a0 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
@@ -241,6 +241,18 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
     */
    private SimpleString simpleAddress;
 
+   /**
+    * Needed for serialization backwards compatibility.
+    */
+   @Deprecated
+   private String address;
+
+   /**
+    * The "JMS" name of the destination. Needed for serialization backwards compatibility.
+    */
+   @Deprecated
+   private String name;
+
    private final boolean temporary;
 
    private final boolean queue;
@@ -254,7 +266,13 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
    protected ActiveMQDestination(final String address,
                                  final TYPE type,
                                  final ActiveMQSession session) {
-      this.simpleAddress = SimpleString.toSimpleString(address);
+      this(SimpleString.toSimpleString(address), type, session);
+   }
+
+   protected ActiveMQDestination(final SimpleString address,
+                                 final TYPE type,
+                                 final ActiveMQSession session) {
+      this.simpleAddress = address;
 
       this.thetype = type;
 
@@ -265,18 +283,24 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
       this.queue = TYPE.isQueue(type);
    }
 
-   protected ActiveMQDestination(final SimpleString address,
+   @Deprecated
+   protected ActiveMQDestination(final String address,
+                                 final String name,
                                  final TYPE type,
                                  final ActiveMQSession session) {
-      this.simpleAddress = address;
-
-      this.thetype = type;
+      this(SimpleString.toSimpleString(address), name, type, session);
+   }
 
-      this.session = session;
+   @Deprecated
+   protected ActiveMQDestination(final SimpleString address,
+                                 final String name,
+                                 final TYPE type,
+                                 final ActiveMQSession session) {
+      this(address, type, session);
 
-      this.temporary = TYPE.isTemporary(type);
+      this.name = name;
 
-      this.queue = TYPE.isQueue(type);
+      this.address = simpleAddress != null ? simpleAddress.toString() : null;
    }
 
    public void setAddress(String address) {
@@ -287,6 +311,7 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
       if (address == null) {
          throw new IllegalArgumentException("address cannot be null");
       }
+      this.address = address.toString();
       this.simpleAddress = address;
    }
 
@@ -319,7 +344,7 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
    }
 
    public String getName() {
-      return simpleAddress.toString();
+      return name != null ? name : getAddress();
    }
 
    public boolean isTemporary() {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1aa7b5c0/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
index 159cce9..b80dddb 100644
--- a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
+++ b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
@@ -31,6 +31,7 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
+version = arg[2]
 System.out.println("File::" + file);
 
 
@@ -49,6 +50,11 @@ if (method.equals("write")) {
     topic = new ActiveMQTopic("topic")
     temporary = ActiveMQDestination.createTemporaryQueue("whatever")
     temporaryTopic = ActiveMQDestination.createTemporaryTopic("whatever")
+    if (version.equals("ARTEMIS-SNAPSHOT")) {
+        destination = new ActiveMQDestination("address", "name", ActiveMQDestination.TYPE.DESTINATION, null)
+    } else if (version.equals("ARTEMIS-155")) {
+        destination = new ActiveMQDestination("address", "name", false, true, null)
+    }
 
     Marshaller marshaller = factory.createMarshaller(configuration)
     FileOutputStream fileOutputStream = new FileOutputStream(file)
@@ -58,6 +64,7 @@ if (method.equals("write")) {
     marshaller.writeObject(topic)
     marshaller.writeObject(temporary)
     marshaller.writeObject(temporaryTopic)
+    marshaller.writeObject(destination)
     marshaller.finish()
     fileOutputStream.close();
 } else {
@@ -69,10 +76,13 @@ if (method.equals("write")) {
     topic = unmarshaller.readObject()
     temporary = unmarshaller.readObject()
     temporaryTopic = unmarshaller.readObject()
+    destination = unmarshaller.readObject()
 }
 
 GroovyRun.assertTrue(!cf.getServerLocator().isBlockOnDurableSend());
 GroovyRun.assertEquals(1048576, cf.getServerLocator().getConfirmationWindowSize());
+GroovyRun.assertEquals(destination.getName(), "name")
+GroovyRun.assertEquals(destination.getAddress(), "address")
 
 Connection connection = cf.createConnection();
 Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1aa7b5c0/tests/compatibility-tests/src/main/resources/serial/serial.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/serial/serial.groovy b/tests/compatibility-tests/src/main/resources/serial/serial.groovy
index 0756fb3..f5a3e5f 100644
--- a/tests/compatibility-tests/src/main/resources/serial/serial.groovy
+++ b/tests/compatibility-tests/src/main/resources/serial/serial.groovy
@@ -24,18 +24,25 @@ import org.apache.activemq.artemis.jms.client.*
 
 file = arg[0]
 method = arg[1]
-System.out.println("File::" + file);
+version = arg[2]
+System.out.println("File::" + file)
 
 
 if (method.equals("write")) {
     cf = new ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576&blockOnDurableSend=false");
     queue = new ActiveMQQueue("queue");
     topic = new ActiveMQTopic("topic")
+    if (version.equals("ARTEMIS-SNAPSHOT")) {
+        destination = new ActiveMQDestination("address", "name", ActiveMQDestination.TYPE.DESTINATION, null)
+    } else if (version.equals("ARTEMIS-155")) {
+        destination = new ActiveMQDestination("address", "name", false, true, null)
+    }
 
     ObjectOutputStream objectOutputStream = new ObjectOutputStream(new FileOutputStream(file));
     objectOutputStream.writeObject(cf);
     objectOutputStream.writeObject(queue)
     objectOutputStream.writeObject(topic)
+    objectOutputStream.writeObject(destination)
     objectOutputStream.close();
 } else {
     ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(file))
@@ -43,11 +50,14 @@ if (method.equals("write")) {
     cf = inputStream.readObject();
     queue = inputStream.readObject()
     topic = inputStream.readObject()
+    destination = inputStream.readObject()
     inputStream.close();
 }
 
 GroovyRun.assertTrue(!cf.getServerLocator().isBlockOnDurableSend());
-GroovyRun.assertEquals(1048576, cf.getServerLocator().getConfirmationWindowSize());
+GroovyRun.assertEquals(1048576, cf.getServerLocator().getConfirmationWindowSize())
+GroovyRun.assertEquals(destination.getName(), "name")
+GroovyRun.assertEquals(destination.getAddress(), "address")
 
 Connection connection = cf.createConnection();
 Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1aa7b5c0/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java
index 3358bbc..2c017f2 100644
--- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java
+++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java
@@ -91,15 +91,15 @@ public class SerializationTest extends VersionedBaseTest {
    @Test
    public void testSerializeFactory() throws Throwable {
       File file = serverFolder.newFile("objects.ser");
-      callScript(senderClassloader, "serial/serial.groovy", file.getAbsolutePath(), "write");
-      callScript(receiverClassloader, "serial/serial.groovy", file.getAbsolutePath(), "read");
+      callScript(senderClassloader, "serial/serial.groovy", file.getAbsolutePath(), "write", sender);
+      callScript(receiverClassloader, "serial/serial.groovy", file.getAbsolutePath(), "read", receiver);
    }
 
    @Test
    public void testJBMSerializeFactory() throws Throwable {
       File file = serverFolder.newFile("objectsjbm.ser");
-      callScript(senderClassloader, "serial/jbmserial.groovy", file.getAbsolutePath(), "write");
-      callScript(receiverClassloader, "serial/jbmserial.groovy", file.getAbsolutePath(), "read");
+      callScript(senderClassloader, "serial/jbmserial.groovy", file.getAbsolutePath(), "write", sender);
+      callScript(receiverClassloader, "serial/jbmserial.groovy", file.getAbsolutePath(), "read", receiver);
    }
 
 }