[hornetq-commits] JBoss hornetq SVN: r9219 - in trunk: src/main/org/hornetq/jms/server/impl and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon May 10 16:35:29 EDT 2010


Author: clebert.suconic at jboss.com
Date: 2010-05-10 16:35:28 -0400 (Mon, 10 May 2010)
New Revision: 9219

Added:
   trunk/src/main/org/hornetq/jms/client/HornetQQueue.java
   trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java
   trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java
   trunk/src/main/org/hornetq/jms/client/HornetQTopic.java
Modified:
   trunk/src/main/org/hornetq/jms/client/HornetQDestination.java
   trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java
   trunk/src/main/org/hornetq/jms/client/HornetQSession.java
   trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
   trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java
   trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java
   trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java
Log:
HORNETQ-384 - Separating Queues and Topics implementation

Modified: trunk/src/main/org/hornetq/jms/client/HornetQDestination.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQDestination.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/client/HornetQDestination.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -18,8 +18,6 @@
 
 import javax.jms.Destination;
 import javax.jms.JMSException;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
 import javax.naming.NamingException;
 import javax.naming.Reference;
 import javax.naming.Referenceable;
@@ -37,7 +35,7 @@
  *
  * $Id$
  */
-public class HornetQDestination implements TemporaryQueue, TemporaryTopic, Serializable, Referenceable
+public class HornetQDestination implements Destination, Serializable, Referenceable
 {
    // Constants -----------------------------------------------------
 
@@ -146,28 +144,28 @@
       return new SimpleString(JMS_TOPIC_ADDRESS_PREFIX + name);
    }
    
-   public static HornetQDestination createQueue(final String name)
+   public static HornetQQueue createQueue(final String name)
    {
-      return new HornetQDestination(JMS_QUEUE_ADDRESS_PREFIX.concat(name), name, false, true, null);
+      return new HornetQQueue(name);
    }
    
-   public static HornetQDestination createTopic(final String name)
+   public static HornetQTopic createTopic(final String name)
    {
-      return new HornetQDestination(JMS_TOPIC_ADDRESS_PREFIX.concat(name), name, false, false, null);
+      return new HornetQTopic(name);
    }
    
-   public static HornetQDestination createTemporaryQueue(final HornetQSession session)
+   public static HornetQTemporaryQueue createTemporaryQueue(final HornetQSession session)
    {
       String name = UUID.randomUUID().toString();
       
-      return new HornetQDestination(JMS_QUEUE_ADDRESS_PREFIX.concat(name), name, true, true, session);
+      return new HornetQTemporaryQueue(JMS_QUEUE_ADDRESS_PREFIX.concat(name), name, session);
    }
    
-   public static HornetQDestination createTemporaryTopic(final HornetQSession session)
+   public static HornetQTemporaryTopic createTemporaryTopic(final HornetQSession session)
    {
       String name = UUID.randomUUID().toString();
       
-      return new HornetQDestination(JMS_TOPIC_ADDRESS_PREFIX.concat(name), name, true, false, session);
+      return new HornetQTemporaryTopic(JMS_TOPIC_ADDRESS_PREFIX.concat(name), name, session);
    }
 
    
@@ -196,7 +194,7 @@
    
    // Constructors --------------------------------------------------
 
-   private HornetQDestination(final String address, final String name,
+   protected HornetQDestination(final String address, final String name,
                                 final boolean temporary,
                                 final boolean queue,
                                 final HornetQSession session)
@@ -224,16 +222,6 @@
                            null);
    }
 
-   public String getQueueName()
-   {
-      return name;
-   }
-   
-   public String getTopicName()
-   {
-      return name;
-   }
-   
    public void delete() throws JMSException
    {
       if (session != null)

Added: trunk/src/main/org/hornetq/jms/client/HornetQQueue.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueue.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueue.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.client;
+
+import javax.jms.Queue;
+
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.core.logging.Logger;
+
+/**
+ * HornetQ implementation of a JMS Queue.
+ * <br>
+ * This class can be instantiated directly.
+ * 
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 8737 $</tt>
+ *
+ * $Id: HornetQQueue.java 8737 2010-01-06 12:41:30Z jmesnil $
+ */
+public class HornetQQueue extends HornetQDestination implements Queue
+{
+   // Constants -----------------------------------------------------
+
+   private static final Logger log = Logger.getLogger(HornetQQueue.class);
+
+   private static final long serialVersionUID = -1106092883162295462L;
+
+   // Static --------------------------------------------------------
+
+   public static SimpleString createAddressFromName(final String name)
+   {
+      return new SimpleString(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX + name);
+   }
+
+   // Attributes ----------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   public HornetQQueue(final String name)
+   {
+      super(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX + name, name, false, true, null);
+   }
+   
+   
+
+   /**
+    * @param address
+    * @param name
+    * @param temporary
+    * @param queue
+    * @param session
+    */
+   public HornetQQueue(String address, String name, boolean temporary, HornetQSession session)
+   {
+      super(address, name, temporary, true, session);
+   }
+
+   protected HornetQQueue(final String address, final String name)
+   {
+      super(address, name, false, true, null);
+   }
+
+   // Queue implementation ------------------------------------------
+
+   // Public --------------------------------------------------------
+
+   public String getQueueName()
+   {
+      return name;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "HornetQQueue[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Modified: trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -49,13 +49,13 @@
 
    private ClientConsumer consumer;
 
-   private final HornetQDestination queue;
+   private final HornetQQueue queue;
 
    private SimpleString filterString;
 
    // Constructors ---------------------------------------------------------------------------------
 
-   protected HornetQQueueBrowser(final HornetQDestination queue, final String messageSelector, final ClientSession session) throws JMSException
+   protected HornetQQueueBrowser(final HornetQQueue queue, final String messageSelector, final ClientSession session) throws JMSException
    {
       this.session = session;
       this.queue = queue;

Modified: trunk/src/main/org/hornetq/jms/client/HornetQSession.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQSession.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/client/HornetQSession.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -385,7 +385,7 @@
          throw new IllegalStateException("Cannot create a queue using a TopicSession");
       }
 
-      HornetQDestination queue = HornetQDestination.createQueue(queueName);
+      HornetQQueue queue = HornetQDestination.createQueue(queueName);
       
       try
       {
@@ -414,7 +414,7 @@
          throw new IllegalStateException("Cannot create a topic on a QueueSession");
       }
 
-      HornetQDestination topic = HornetQDestination.createTopic(topicName);
+      HornetQTopic topic = HornetQDestination.createTopic(topicName);
       
       try
       {
@@ -684,7 +684,7 @@
          throw JMSExceptionHelper.convertFromHornetQException(e);
       }
 
-      return new HornetQQueueBrowser(jbq, filterString, session);
+      return new HornetQQueueBrowser((HornetQQueue)jbq, filterString, session);
 
    }
 
@@ -698,7 +698,7 @@
 
       try
       {
-         HornetQDestination queue = HornetQDestination.createTemporaryQueue(this);
+         HornetQTemporaryQueue queue = HornetQDestination.createTemporaryQueue(this);
 
          SimpleString simpleAddress = queue.getSimpleAddress();
 
@@ -724,7 +724,7 @@
 
       try
       {
-         HornetQDestination topic = HornetQDestination.createTemporaryTopic(this);
+         HornetQTemporaryTopic topic = HornetQDestination.createTemporaryTopic(this);
 
          SimpleString simpleAddress = topic.getSimpleAddress();
 

Added: trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.client;
+
+import javax.jms.JMSException;
+import javax.jms.TemporaryQueue;
+
+
+/**
+ * HornetQ implementation of a JMS TemporaryQueue.
+ * <br>
+ * This class can be instantiated directly.
+ * 
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 3569 $</tt>
+ *
+ * $Id: HornetQQueue.java 3569 2008-01-15 21:14:04Z timfox $
+ */
+public class HornetQTemporaryQueue extends HornetQQueue implements TemporaryQueue
+{
+   // Constants -----------------------------------------------------
+
+   private static final long serialVersionUID = -4624930377557954624L;
+
+   // Static --------------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   // Constructors --------------------------------------------------
+ 
+
+   // TemporaryQueue implementation ------------------------------------------
+
+   // Public --------------------------------------------------------
+
+   /**
+    * @param address
+    * @param name
+    * @param temporary
+    * @param queue
+    * @param session
+    */
+   public HornetQTemporaryQueue(String address, String name, HornetQSession session)
+   {
+      super(address, name, true, session);
+   }
+
+   @Override
+   public String toString()
+   {
+      return "HornetQTemporaryQueue[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Added: trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.client;
+
+import javax.jms.TemporaryTopic;
+
+/**
+ * A HornetQTemporaryTopic
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+public class HornetQTemporaryTopic extends HornetQTopic implements TemporaryTopic
+{
+
+   // Constants -----------------------------------------------------
+
+   private static final long serialVersionUID = 845450764835635266L;
+
+   // Attributes ----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   protected HornetQTemporaryTopic(final String address, final String name,
+                                final HornetQSession session)
+   {
+      super(address, name, true, session);
+   }
+
+   // Public --------------------------------------------------------
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+
+}

Added: trunk/src/main/org/hornetq/jms/client/HornetQTopic.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTopic.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTopic.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.client;
+
+import javax.jms.JMSException;
+import javax.jms.Topic;
+
+import org.hornetq.api.core.Pair;
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.jms.client.HornetQDestination;
+
+/**
+ * HornetQ implementation of a JMS Topic.
+ * <br>
+ * This class can be instantiated directly.
+ * 
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 8737 $</tt>
+ *
+ * $Id: HornetQTopic.java 8737 2010-01-06 12:41:30Z jmesnil $
+ */
+public class HornetQTopic extends HornetQDestination implements Topic
+{
+   // Constants -----------------------------------------------------
+
+   private static final long serialVersionUID = 7873614001276404156L;
+   // Static --------------------------------------------------------
+
+   public static SimpleString createAddressFromName(final String name)
+   {
+      return new SimpleString(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX + name);
+   }
+
+   // Attributes ----------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   public HornetQTopic(final String name)
+   {
+      super(HornetQQueue.JMS_TOPIC_ADDRESS_PREFIX + name, name, false, false, null);
+   }
+   
+
+   /**
+    * @param address
+    * @param name
+    * @param temporary
+    * @param queue
+    * @param session
+    */
+   protected HornetQTopic(String address, String name, boolean temporary, HornetQSession session)
+   {
+      super(address, name, temporary, false, session);
+   }
+  
+
+   // Topic implementation ------------------------------------------
+
+   public String getTopicName()
+   {
+      return name;
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public String toString()
+   {
+      return "HornetQTopic[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -47,6 +47,8 @@
 import org.hornetq.core.settings.impl.AddressSettings;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.client.SelectorTranslator;
 import org.hornetq.jms.persistence.JMSStorageManager;
 import org.hornetq.jms.persistence.config.PersistedConnectionFactory;
@@ -92,9 +94,9 @@
     */
    private Context context;
 
-   private Map<String, HornetQDestination> queues = new HashMap<String, HornetQDestination>();
+   private Map<String, HornetQQueue> queues = new HashMap<String, HornetQQueue>();
 
-   private Map<String, HornetQDestination> topics = new HashMap<String, HornetQDestination>();
+   private Map<String, HornetQTopic> topics = new HashMap<String, HornetQTopic>();
 
    private final Map<String, HornetQConnectionFactory> connectionFactories = new HashMap<String, HornetQConnectionFactory>();
 
@@ -439,7 +441,7 @@
    {
       checkInitialised();
 
-      HornetQDestination destination = topics.get(topicName);
+      HornetQTopic destination = topics.get(topicName);
       if (destination == null)
       {
          throw new IllegalArgumentException("Topic does not exist");
@@ -477,7 +479,7 @@
    {
       checkInitialised();
 
-      HornetQDestination destination = queues.get(queueName);
+      HornetQQueue destination = queues.get(queueName);
       if (destination == null)
       {
          throw new IllegalArgumentException("Queue does not exist");
@@ -1082,7 +1084,7 @@
       }
       else
       {
-         HornetQDestination hqQueue = HornetQDestination.createQueue(queueName);
+         HornetQQueue hqQueue = HornetQDestination.createQueue(queueName);
 
          // Convert from JMS selector to core filter
          String coreFilterString = null;
@@ -1122,7 +1124,7 @@
       }
       else
       {
-         HornetQDestination hqTopic = HornetQDestination.createTopic(topicName);
+         HornetQTopic hqTopic = HornetQDestination.createTopic(topicName);
          // We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS
          // checks when routing messages to a topic that
          // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no

Modified: trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -15,7 +15,8 @@
 
 import org.hornetq.api.jms.management.JMSServerControl;
 import org.hornetq.jms.client.HornetQConnectionFactory;
-import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.server.JMSServerManager;
 
 /**
@@ -30,11 +31,11 @@
 
    void unregisterJMSServer() throws Exception;
 
-   void registerQueue(HornetQDestination queue) throws Exception;
+   void registerQueue(HornetQQueue queue) throws Exception;
 
    void unregisterQueue(String name) throws Exception;
 
-   void registerTopic(HornetQDestination topic) throws Exception;
+   void registerTopic(HornetQTopic topic) throws Exception;
 
    void unregisterTopic(String name) throws Exception;
 

Modified: trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -27,6 +27,8 @@
 import org.hornetq.core.server.management.ManagementService;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.management.impl.JMSConnectionFactoryControlImpl;
 import org.hornetq.jms.management.impl.JMSQueueControlImpl;
 import org.hornetq.jms.management.impl.JMSServerControlImpl;
@@ -78,7 +80,7 @@
       managementService.unregisterFromRegistry(ResourceNames.JMS_SERVER);
    }
 
-   public synchronized void registerQueue(final HornetQDestination queue) throws Exception
+   public synchronized void registerQueue(final HornetQQueue queue) throws Exception
    {
       QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue.getAddress());
       MessageCounterManager messageCounterManager = managementService.getMessageCounterManager();
@@ -102,7 +104,7 @@
       managementService.unregisterFromRegistry(ResourceNames.JMS_QUEUE + name);
    }
 
-   public synchronized void registerTopic(final HornetQDestination topic) throws Exception
+   public synchronized void registerTopic(final HornetQTopic topic) throws Exception
    {
       ObjectName objectName = managementService.getObjectNameBuilder().getJMSTopicObjectName(topic.getTopicName());
       AddressControl addressControl = (AddressControl)managementService.getResource(ResourceNames.CORE_ADDRESS + topic.getAddress());

Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -27,6 +27,8 @@
 
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
 import org.hornetq.jms.referenceable.DestinationObjectFactory;
 import org.hornetq.jms.tests.util.ProxyAssertSupport;
@@ -105,7 +107,7 @@
 
       ProxyAssertSupport.assertTrue(instance instanceof HornetQDestination);
 
-      HornetQDestination queue2 = (HornetQDestination)instance;
+      HornetQQueue queue2 = (HornetQQueue)instance;
 
       ProxyAssertSupport.assertEquals(HornetQServerTestCase.queue1.getQueueName(), queue2.getQueueName());
 
@@ -127,7 +129,7 @@
 
       ProxyAssertSupport.assertTrue(instance instanceof HornetQDestination);
       
-      HornetQDestination topic2 = (HornetQDestination)instance;
+      HornetQTopic topic2 = (HornetQTopic)instance;
 
       ProxyAssertSupport.assertEquals(HornetQServerTestCase.topic1.getTopicName(), topic2.getTopicName());
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -40,6 +40,7 @@
 import org.hornetq.core.settings.impl.AddressSettings;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
@@ -66,7 +67,7 @@
 
    private JMSServerManagerImpl serverManager;
 
-   protected HornetQDestination queue;
+   protected HornetQQueue queue;
 
    protected Context context;
 
@@ -416,7 +417,7 @@
    {
       JMSQueueControl queueControl = createManagementControl();
       String expiryQueueName = RandomUtil.randomString();
-      HornetQDestination expiryQueue = (HornetQDestination)HornetQJMSClient.createQueue(expiryQueueName);
+      HornetQQueue expiryQueue = (HornetQQueue)HornetQJMSClient.createQueue(expiryQueueName);
       serverManager.createQueue(false, expiryQueueName, null, true, expiryQueueName);
       queueControl.setExpiryAddress(expiryQueue.getAddress());
 
@@ -545,7 +546,7 @@
    {
       String deadLetterQueue = RandomUtil.randomString();
       serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
-      HornetQDestination dlq = (HornetQDestination)HornetQJMSClient.createQueue(deadLetterQueue);
+      HornetQQueue dlq = (HornetQQueue)HornetQJMSClient.createQueue(deadLetterQueue);
 
       Connection conn = createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -606,7 +607,7 @@
 
       String deadLetterQueue = RandomUtil.randomString();
       serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
-      HornetQDestination dlq = (HornetQDestination)HornetQJMSClient.createQueue(deadLetterQueue);
+      HornetQQueue dlq = (HornetQQueue)HornetQJMSClient.createQueue(deadLetterQueue);
 
       Connection conn = createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -835,7 +836,7 @@
 
       String queueName = RandomUtil.randomString();
       serverManager.createQueue(false, queueName, null, true, queueName);
-      queue = (HornetQDestination)HornetQJMSClient.createQueue(queueName);
+      queue = (HornetQQueue)HornetQJMSClient.createQueue(queueName);
    }
 
    @Override

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -27,6 +27,7 @@
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
 
 /**
  * 
@@ -78,7 +79,7 @@
    @Override
    protected JMSQueueControl createManagementControl() throws Exception
    {
-      HornetQDestination managementQueue = (HornetQDestination) HornetQJMSClient.createQueue("hornetq.management");
+      HornetQQueue managementQueue = (HornetQQueue) HornetQJMSClient.createQueue("hornetq.management");
 
       final JMSMessagingProxy proxy = new JMSMessagingProxy(session,
                                                             managementQueue,

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -29,6 +29,7 @@
 import org.hornetq.core.security.Role;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
 
 /**
  * A JMSServerControlUsingCoreTest
@@ -88,7 +89,7 @@
    @Override
    protected JMSServerControl createManagementControl() throws Exception
    {
-      HornetQDestination managementQueue = (HornetQDestination) HornetQJMSClient.createQueue("hornetq.management");
+      HornetQQueue managementQueue = (HornetQQueue) HornetQJMSClient.createQueue("hornetq.management");
       final JMSMessagingProxy proxy = new JMSMessagingProxy(session, managementQueue, ResourceNames.JMS_SERVER);
 
       return new JMSServerControl()

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -31,6 +31,7 @@
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
@@ -62,7 +63,7 @@
 
    private String subscriptionName;
 
-   protected HornetQDestination topic;
+   protected HornetQTopic topic;
 
    private String topicBinding = "/topic/" + RandomUtil.randomString();
 
@@ -433,7 +434,7 @@
 
       String topicName = RandomUtil.randomString();
       serverManager.createTopic(false, topicName, topicBinding);
-      topic = (HornetQDestination)HornetQJMSClient.createTopic(topicName);
+      topic = (HornetQTopic)HornetQJMSClient.createTopic(topicName);
    }
 
    @Override

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java	2010-05-10 14:29:02 UTC (rev 9218)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java	2010-05-10 20:35:28 UTC (rev 9219)
@@ -33,6 +33,8 @@
 import org.hornetq.core.server.HornetQServers;
 import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.unit.util.InVMContext;
@@ -53,7 +55,7 @@
 
    private String subscriptionName;
 
-   protected HornetQDestination topic;
+   protected HornetQTopic topic;
 
    protected JMSMessagingProxy proxy;
 
@@ -358,14 +360,14 @@
 
       String topicName = RandomUtil.randomString();
       serverManager.createTopic(false, topicName, topicBinding );
-      topic = (HornetQDestination)HornetQJMSClient.createTopic(topicName);
+      topic = (HornetQTopic)HornetQJMSClient.createTopic(topicName);
 
       HornetQConnectionFactory cf = (HornetQConnectionFactory)HornetQJMSClient.createConnectionFactory(new TransportConfiguration(InVMConnectorFactory.class.getName()));
       connection = cf.createQueueConnection();
       session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
       connection.start();
 
-      HornetQDestination managementQueue = (HornetQDestination)HornetQJMSClient.createQueue("hornetq.management");
+      HornetQQueue managementQueue = (HornetQQueue)HornetQJMSClient.createQueue("hornetq.management");
       proxy = new JMSMessagingProxy(session, managementQueue, ResourceNames.JMS_TOPIC + topic.getTopicName());
    }
 



More information about the hornetq-commits mailing list