[hornetq-commits] JBoss hornetq SVN: r8737 - in trunk: examples/common and 27 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jan 6 07:41:31 EST 2010


Author: jmesnil
Date: 2010-01-06 07:41:30 -0500 (Wed, 06 Jan 2010)
New Revision: 8737

Added:
   trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQDestination.java
   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
Removed:
   trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java
   trunk/src/main/org/hornetq/jms/HornetQDestination.java
   trunk/src/main/org/hornetq/jms/HornetQQueue.java
   trunk/src/main/org/hornetq/jms/HornetQTemporaryQueue.java
   trunk/src/main/org/hornetq/jms/HornetQTemporaryTopic.java
   trunk/src/main/org/hornetq/jms/HornetQTopic.java
Modified:
   trunk/docs/user-manual/en/configuration-index.xml
   trunk/docs/user-manual/en/management.xml
   trunk/examples/common/build.xml
   trunk/examples/jms/applet/build.xml
   trunk/examples/jms/management/server0/hornetq-configuration.xml
   trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
   trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
   trunk/src/main/org/hornetq/jms/client/HornetQMessage.java
   trunk/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java
   trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
   trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java
   trunk/src/main/org/hornetq/jms/client/package-info.java
   trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
   trunk/src/main/org/hornetq/jms/management/impl/JMSQueueControlImpl.java
   trunk/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.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/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java
   trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
   trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
   trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java
   trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
   trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
   trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseConnectionOnGCTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/consumer/ConsumerTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.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/JMSUtil.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
   trunk/tests/src/org/hornetq/tests/opt/SendTest.java
   trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
   trunk/tests/src/org/hornetq/tests/unit/jms/HornetQDestinationTest.java
   trunk/tests/src/org/hornetq/tests/unit/jms/HornetQQueueTest.java
   trunk/tests/src/org/hornetq/tests/unit/jms/HornetQTopicTest.java
   trunk/tests/src/org/hornetq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java
   trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
Log:
HORNETQ-258: Public vs. Private API

* moved o.h.jms.HornetQ* classes with other JMS implementations o.h.jms.client
* renamed default management address so that JMS client can create a JMS queue
  bound to it to send management messages
* fixed applet example


Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/docs/user-manual/en/configuration-index.xml	2010-01-06 12:41:30 UTC (rev 8737)
@@ -223,7 +223,7 @@
                             <entry>String</entry>
                             <entry>the name of the management address to send management messages
                                 to</entry>
-                            <entry>hornetq.management</entry>
+                            <entry>jms.queue.hornetq.management</entry>
                         </row>
                         <row>
                             <entry><link linkend="management.replication"

Modified: trunk/docs/user-manual/en/management.xml
===================================================================
--- trunk/docs/user-manual/en/management.xml	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/docs/user-manual/en/management.xml	2010-01-06 12:41:30 UTC (rev 8737)
@@ -618,7 +618,7 @@
             >exampleQueue</literal>:</para>
       <programlisting>
    ClientSession session = ...
-   ClientRequestor requestor = new ClientRequestor(session, "hornetq.management");
+   ClientRequestor requestor = new ClientRequestor(session, "jms.queue.hornetq.management");
    ClientMessage message = session.createMessage(false);
    ManagementHelper.putAttribute(message, "core.queue.exampleQueue", "messageCount");
    ClientMessage reply = requestor.request(m);
@@ -637,16 +637,17 @@
          <para>The management address to send management messages is configured in <literal
                >hornetq-configuration.xml</literal>:</para>
          <programlisting>
-   &lt;management-address&gt;hornetq.management&lt;/management-address&gt;
+   &lt;management-address&gt;jms.queue.hornetq.management&lt;/management-address&gt;
          </programlisting>
-         <para>By default, the address is <literal>hornetq.management</literal>.</para>
+         <para>By default, the address is <literal>jms.queue.hornetq.management</literal>
+         (it is prepended by "jms.queue" so that JMS clients can also send management messages).</para>
          <para>The management address requires a <emphasis>special</emphasis> user permission
                <literal>manage</literal> to be able to receive and handle management messages. This
             is also configured in hornetq-configuration.xml:</para>
          <programlisting>
    &lt;!-- users with the admin role will be allowed to manage --&gt; 
    &lt;!-- HornetQ using management messages        --&gt;
-   &lt;security-setting match="hornetq.management"&gt;
+   &lt;security-setting match="jms.queue.hornetq.management"&gt;
       &lt;permission type="manage" roles="admin" /&gt;
    &lt;/security-setting&gt;
          </programlisting>
@@ -660,7 +661,7 @@
       <para>The <emphasis>management queue</emphasis> is a special queue and needs to be
          instantiated directly by the client:</para>
       <programlisting>
-   Queue managementQueue = HornetQJMSClient.createHornetQQueue("hornetq.management", "hornetq.management");
+   Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management");
       </programlisting>
       <para>All the other steps are the same than for the Core API but they use JMS API
          instead:</para>
@@ -689,13 +690,13 @@
       <para>For example, to know the number of messages in the JMS queue <literal
             >exampleQueue</literal>:</para>
       <programlisting>
-   Queue managementQueue = HornetQJMSClient.createHornetQQueue("hornetq.management", "hornetq.management");   
+   Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management");   
    
    QueueSession session = ...      
    QueueRequestor requestor = new QueueRequestor(session, managementQueue);
    connection.start();
    Message message = session.createMessage();
-   JMSManagementHelper.putAttribute(message, "jms.queue.exampleQueue", "managementQueueessageCount");
+   JMSManagementHelper.putAttribute(message, "jms.queue.exampleQueue", "messageCount");
    Message reply = requestor.request(message);
    int count = (Integer)JMSManagementHelper.getResult(reply);
    System.out.println("There are " + count + " messages in exampleQueue");

Modified: trunk/examples/common/build.xml
===================================================================
--- trunk/examples/common/build.xml	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/examples/common/build.xml	2010-01-06 12:41:30 UTC (rev 8737)
@@ -72,10 +72,10 @@
       <fileset dir="${hornetq.jars.dir}">
          <include name="**/*client*.jar"/>
          <include  name="**/jboss-jms-api.jar"/>
-         <include name="**/netty.jar"/>
       </fileset>
        <fileset dir="${jars.dir}">
-         <include  name="**/jboss-jms-api.jar"/>
+         <include name="**/jboss-jms-api.jar"/>
+         <include name="**/netty.jar"/>
       </fileset>
       <path refid="extra.classpath"/>
    </path>

Modified: trunk/examples/jms/applet/build.xml
===================================================================
--- trunk/examples/jms/applet/build.xml	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/examples/jms/applet/build.xml	2010-01-06 12:41:30 UTC (rev 8737)
@@ -19,6 +19,12 @@
 
    <import file="../../common/build.xml"/>
 
+   <path id="extra.classpath">
+      <fileset dir="${jars.dir}">
+         <include name="**/netty.jar" />
+      </fileset>
+   </path>
+   
    <path id="applet.classpath">
       <fileset dir="build/classes" />
 	  <fileset dir="build/classes">
@@ -28,10 +34,12 @@
 	
    <target name="init">
       <mkdir dir="build/classes" />
-	  <copy todir="build/classes">
-	     <fileset dir="${hornetq.jars.dir}">
-	        <include name="hornetq-core-client.jar"/>
-	        <include name="hornetq-jms-client.jar"/>
+	  <copy todir="build/classes" flatten="true">
+  	     <fileset dir="${client.jars.dir}">
+  	        <include name="hornetq-core-client.jar"/>
+  	        <include name="hornetq-jms-client.jar"/>
+  	     </fileset>
+  	     <fileset dir="${hornetq.jars.dir}">
 	        <include name="hornetq-transports.jar"/>
 	     </fileset>
 	     <fileset dir="${jars.dir}">

Modified: trunk/examples/jms/management/server0/hornetq-configuration.xml
===================================================================
--- trunk/examples/jms/management/server0/hornetq-configuration.xml	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/examples/jms/management/server0/hornetq-configuration.xml	2010-01-06 12:41:30 UTC (rev 8737)
@@ -2,7 +2,7 @@
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
 
-   <management-address>hornetq.management</management-address>
+   <management-address>jms.queue.hornetq.management</management-address>
 
    <connectors>
       <connector name="netty">
@@ -30,7 +30,7 @@
       </security-setting>
 
       <!--security for management queue-->
-      <security-setting match="hornetq.management">
+      <security-setting match="jms.queue.hornetq.management">
          <permission type="manage" roles="guest" />
       </security-setting>
 

Modified: trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -22,9 +22,9 @@
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSessionFactory;
 import org.hornetq.core.logging.Logger;
-import org.hornetq.jms.HornetQConnectionFactory;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 
 /**
  * A utility class for creating HornetQ Client Side JMS Objects.

Modified: trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -132,7 +132,8 @@
 
    public static final long DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD = 1000;
 
-   public static final SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("hornetq.management");
+   // the management address is prefix with jms.queue so that JMS clients can send messages to it too.
+   public static final SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("jms.queue.hornetq.management");
 
    public static final SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("hornetq.notifications");
 

Deleted: trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,632 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.XAConnection;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XAQueueConnection;
-import javax.jms.XAQueueConnectionFactory;
-import javax.jms.XATopicConnection;
-import javax.jms.XATopicConnectionFactory;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-
-import org.hornetq.api.core.Pair;
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.ClientSessionFactory;
-import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.jms.client.HornetQConnection;
-import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
-import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
-
-/**
- * HornetQ implementation of a JMS ConnectionFactory.
- * 
- * @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$</tt> $Id$
- */
-public class HornetQConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory,
-         XAConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory, Serializable, Referenceable
-{
-   // Constants ------------------------------------------------------------------------------------
-
-   private final static long serialVersionUID = -2810634789345348326L;
-
-   private static final Logger log = Logger.getLogger(HornetQConnectionFactory.class);
-
-   // Static ---------------------------------------------------------------------------------------
-
-   // Attributes -----------------------------------------------------------------------------------
-
-   private final ClientSessionFactory sessionFactory;
-
-   private String clientID;
-
-   private int dupsOKBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE;
-
-   private int transactionBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE;
-
-   private boolean readOnly;
-
-   // Constructors ---------------------------------------------------------------------------------
-
-   public HornetQConnectionFactory()
-   {
-      sessionFactory = HornetQClient.createClientSessionFactory();
-   }
-
-   public HornetQConnectionFactory(final ClientSessionFactory sessionFactory)
-   {
-      this.sessionFactory = sessionFactory;
-   }
-
-   public HornetQConnectionFactory(final String discoveryAddress, final int discoveryPort)
-   {
-      sessionFactory = HornetQClient.createClientSessionFactory(discoveryAddress, discoveryPort);
-   }
-
-   public HornetQConnectionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
-   {
-      sessionFactory = HornetQClient.createClientSessionFactory(staticConnectors);
-   }
-
-   public HornetQConnectionFactory(final TransportConfiguration connectorConfig,
-                                   final TransportConfiguration backupConnectorConfig)
-   {
-      sessionFactory = HornetQClient.createClientSessionFactory(connectorConfig, backupConnectorConfig);
-   }
-
-   public HornetQConnectionFactory(final TransportConfiguration connectorConfig)
-   {
-      this(connectorConfig, null);
-   }
-
-   // ConnectionFactory implementation -------------------------------------------------------------
-
-   public Connection createConnection() throws JMSException
-   {
-      return createConnection(null, null);
-   }
-
-   public Connection createConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_GENERIC_CONNECTION);
-   }
-
-   // QueueConnectionFactory implementation --------------------------------------------------------
-
-   public QueueConnection createQueueConnection() throws JMSException
-   {
-      return createQueueConnection(null, null);
-   }
-
-   public QueueConnection createQueueConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_QUEUE_CONNECTION);
-   }
-
-   // TopicConnectionFactory implementation --------------------------------------------------------
-
-   public TopicConnection createTopicConnection() throws JMSException
-   {
-      return createTopicConnection(null, null);
-   }
-
-   public TopicConnection createTopicConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_TOPIC_CONNECTION);
-   }
-
-   // XAConnectionFactory implementation -----------------------------------------------------------
-
-   public XAConnection createXAConnection() throws JMSException
-   {
-      return createXAConnection(null, null);
-   }
-
-   public XAConnection createXAConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_GENERIC_CONNECTION);
-   }
-
-   // XAQueueConnectionFactory implementation ------------------------------------------------------
-
-   public XAQueueConnection createXAQueueConnection() throws JMSException
-   {
-      return createXAQueueConnection(null, null);
-   }
-
-   public XAQueueConnection createXAQueueConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_QUEUE_CONNECTION);
-   }
-
-   // XATopicConnectionFactory implementation ------------------------------------------------------
-
-   public XATopicConnection createXATopicConnection() throws JMSException
-   {
-      return createXATopicConnection(null, null);
-   }
-
-   public XATopicConnection createXATopicConnection(final String username, final String password) throws JMSException
-   {
-      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_TOPIC_CONNECTION);
-   }
-
-   // Referenceable implementation -----------------------------------------------------------------
-
-   public Reference getReference() throws NamingException
-   {
-      return new Reference(this.getClass().getCanonicalName(),
-                           new SerializableObjectRefAddr("HornetQ-CF", this),
-                           ConnectionFactoryObjectFactory.class.getCanonicalName(),
-                           null);
-   }
-
-   // Public ---------------------------------------------------------------------------------------
-
-   public synchronized String getConnectionLoadBalancingPolicyClassName()
-   {
-      return sessionFactory.getConnectionLoadBalancingPolicyClassName();
-   }
-
-   public synchronized void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName)
-   {
-      checkWrite();
-      sessionFactory.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
-   }
-
-   public synchronized List<Pair<TransportConfiguration, TransportConfiguration>> getStaticConnectors()
-   {
-      return sessionFactory.getStaticConnectors();
-   }
-
-   public synchronized void setStaticConnectors(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
-   {
-      checkWrite();
-      sessionFactory.setStaticConnectors(staticConnectors);
-   }
-
-   public synchronized String getDiscoveryAddress()
-   {
-      return sessionFactory.getDiscoveryAddress();
-   }
-
-   public synchronized void setDiscoveryAddress(final String discoveryAddress)
-   {
-      checkWrite();
-      sessionFactory.setDiscoveryAddress(discoveryAddress);
-   }
-
-   public synchronized int getDiscoveryPort()
-   {
-      return sessionFactory.getDiscoveryPort();
-   }
-
-   public synchronized void setDiscoveryPort(final int discoveryPort)
-   {
-      checkWrite();
-      sessionFactory.setDiscoveryPort(discoveryPort);
-   }
-
-   public synchronized long getDiscoveryRefreshTimeout()
-   {
-      return sessionFactory.getDiscoveryRefreshTimeout();
-   }
-
-   public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
-   {
-      checkWrite();
-      sessionFactory.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
-   }
-
-   public synchronized long getDiscoveryInitialWaitTimeout()
-   {
-      return sessionFactory.getDiscoveryInitialWaitTimeout();
-   }
-
-   public synchronized void setDiscoveryInitialWaitTimeout(final long discoveryInitialWaitTimeout)
-   {
-      checkWrite();
-      sessionFactory.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
-   }
-
-   public synchronized String getClientID()
-   {
-      return clientID;
-   }
-
-   public synchronized void setClientID(final String clientID)
-   {
-      checkWrite();
-      this.clientID = clientID;
-   }
-
-   public synchronized int getDupsOKBatchSize()
-   {
-      return dupsOKBatchSize;
-   }
-
-   public synchronized void setDupsOKBatchSize(final int dupsOKBatchSize)
-   {
-      checkWrite();
-      this.dupsOKBatchSize = dupsOKBatchSize;
-   }
-
-   public synchronized int getTransactionBatchSize()
-   {
-      return transactionBatchSize;
-   }
-
-   public synchronized void setTransactionBatchSize(final int transactionBatchSize)
-   {
-      checkWrite();
-      this.transactionBatchSize = transactionBatchSize;
-   }
-
-   public synchronized long getClientFailureCheckPeriod()
-   {
-      return sessionFactory.getClientFailureCheckPeriod();
-   }
-
-   public synchronized void setClientFailureCheckPeriod(final long clientFailureCheckPeriod)
-   {
-      checkWrite();
-      sessionFactory.setClientFailureCheckPeriod(clientFailureCheckPeriod);
-   }
-
-   public synchronized long getConnectionTTL()
-   {
-      return sessionFactory.getConnectionTTL();
-   }
-
-   public synchronized void setConnectionTTL(final long connectionTTL)
-   {
-      checkWrite();
-      sessionFactory.setConnectionTTL(connectionTTL);
-   }
-
-   public synchronized long getCallTimeout()
-   {
-      return sessionFactory.getCallTimeout();
-   }
-
-   public synchronized void setCallTimeout(final long callTimeout)
-   {
-      checkWrite();
-      sessionFactory.setCallTimeout(callTimeout);
-   }
-
-   public synchronized int getConsumerWindowSize()
-   {
-      return sessionFactory.getConsumerWindowSize();
-   }
-
-   public synchronized void setConsumerWindowSize(final int consumerWindowSize)
-   {
-      checkWrite();
-      sessionFactory.setConsumerWindowSize(consumerWindowSize);
-   }
-
-   public synchronized int getConsumerMaxRate()
-   {
-      return sessionFactory.getConsumerMaxRate();
-   }
-
-   public synchronized void setConsumerMaxRate(final int consumerMaxRate)
-   {
-      checkWrite();
-      sessionFactory.setConsumerMaxRate(consumerMaxRate);
-   }
-
-   public synchronized int getConfirmationWindowSize()
-   {
-      return sessionFactory.getConfirmationWindowSize();
-   }
-
-   public synchronized void setConfirmationWindowSize(final int confirmationWindowSize)
-   {
-      checkWrite();
-      sessionFactory.setConfirmationWindowSize(confirmationWindowSize);
-   }
-
-   public synchronized int getProducerMaxRate()
-   {
-      return sessionFactory.getProducerMaxRate();
-   }
-
-   public synchronized void setProducerMaxRate(final int producerMaxRate)
-   {
-      checkWrite();
-      sessionFactory.setProducerMaxRate(producerMaxRate);
-   }
-
-   public synchronized int getProducerWindowSize()
-   {
-      return sessionFactory.getProducerWindowSize();
-   }
-
-   public synchronized void setProducerWindowSize(final int producerWindowSize)
-   {
-      checkWrite();
-      sessionFactory.setProducerWindowSize(producerWindowSize);
-   }
-
-   /**
-    * @param cacheLargeMessagesClient
-    */
-   public synchronized void setCacheLargeMessagesClient(final boolean cacheLargeMessagesClient)
-   {
-      checkWrite();
-      sessionFactory.setCacheLargeMessagesClient(cacheLargeMessagesClient);
-   }
-
-   public synchronized boolean isCacheLargeMessagesClient()
-   {
-      return sessionFactory.isCacheLargeMessagesClient();
-   }
-
-   public synchronized int getMinLargeMessageSize()
-   {
-      return sessionFactory.getMinLargeMessageSize();
-   }
-
-   public synchronized void setMinLargeMessageSize(final int minLargeMessageSize)
-   {
-      checkWrite();
-      sessionFactory.setMinLargeMessageSize(minLargeMessageSize);
-   }
-
-   public synchronized boolean isBlockOnAcknowledge()
-   {
-      return sessionFactory.isBlockOnAcknowledge();
-   }
-
-   public synchronized void setBlockOnAcknowledge(final boolean blockOnAcknowledge)
-   {
-      checkWrite();
-      sessionFactory.setBlockOnAcknowledge(blockOnAcknowledge);
-   }
-
-   public synchronized boolean isBlockOnNonDurableSend()
-   {
-      return sessionFactory.isBlockOnNonDurableSend();
-   }
-
-   public synchronized void setBlockOnNonDurableSend(final boolean blockOnNonDurableSend)
-   {
-      checkWrite();
-      sessionFactory.setBlockOnNonDurableSend(blockOnNonDurableSend);
-   }
-
-   public synchronized boolean isBlockOnDurableSend()
-   {
-      return sessionFactory.isBlockOnDurableSend();
-   }
-
-   public synchronized void setBlockOnDurableSend(final boolean blockOnDurableSend)
-   {
-      checkWrite();
-      sessionFactory.setBlockOnDurableSend(blockOnDurableSend);
-   }
-
-   public synchronized boolean isAutoGroup()
-   {
-      return sessionFactory.isAutoGroup();
-   }
-
-   public synchronized void setAutoGroup(final boolean autoGroup)
-   {
-      checkWrite();
-      sessionFactory.setAutoGroup(autoGroup);
-   }
-
-   public synchronized boolean isPreAcknowledge()
-   {
-      return sessionFactory.isPreAcknowledge();
-   }
-
-   public synchronized void setPreAcknowledge(final boolean preAcknowledge)
-   {
-      checkWrite();
-      sessionFactory.setPreAcknowledge(preAcknowledge);
-   }
-
-   public synchronized long getRetryInterval()
-   {
-      return sessionFactory.getRetryInterval();
-   }
-
-   public synchronized void setRetryInterval(final long retryInterval)
-   {
-      checkWrite();
-      sessionFactory.setRetryInterval(retryInterval);
-   }
-
-   public synchronized long getMaxRetryInterval()
-   {
-      return sessionFactory.getMaxRetryInterval();
-   }
-
-   public synchronized void setMaxRetryInterval(final long retryInterval)
-   {
-      checkWrite();
-      sessionFactory.setMaxRetryInterval(retryInterval);
-   }
-
-   public synchronized double getRetryIntervalMultiplier()
-   {
-      return sessionFactory.getRetryIntervalMultiplier();
-   }
-
-   public synchronized void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
-   {
-      checkWrite();
-      sessionFactory.setRetryIntervalMultiplier(retryIntervalMultiplier);
-   }
-
-   public synchronized int getReconnectAttempts()
-   {
-      return sessionFactory.getReconnectAttempts();
-   }
-
-   public synchronized void setReconnectAttempts(final int reconnectAttempts)
-   {
-      checkWrite();
-      sessionFactory.setReconnectAttempts(reconnectAttempts);
-   }
-
-   public synchronized boolean isFailoverOnServerShutdown()
-   {
-      return sessionFactory.isFailoverOnServerShutdown();
-   }
-
-   public synchronized void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
-   {
-      checkWrite();
-      sessionFactory.setFailoverOnServerShutdown(failoverOnServerShutdown);
-   }
-
-   public synchronized boolean isUseGlobalPools()
-   {
-      return sessionFactory.isUseGlobalPools();
-   }
-
-   public synchronized void setUseGlobalPools(final boolean useGlobalPools)
-   {
-      checkWrite();
-      sessionFactory.setUseGlobalPools(useGlobalPools);
-   }
-
-   public synchronized int getScheduledThreadPoolMaxSize()
-   {
-      return sessionFactory.getScheduledThreadPoolMaxSize();
-   }
-
-   public synchronized void setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize)
-   {
-      checkWrite();
-      sessionFactory.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
-   }
-
-   public synchronized int getThreadPoolMaxSize()
-   {
-      return sessionFactory.getThreadPoolMaxSize();
-   }
-
-   public synchronized void setThreadPoolMaxSize(final int threadPoolMaxSize)
-   {
-      checkWrite();
-      sessionFactory.setThreadPoolMaxSize(threadPoolMaxSize);
-   }
-
-   public synchronized int getInitialMessagePacketSize()
-   {
-      return sessionFactory.getInitialMessagePacketSize();
-   }
-
-   public synchronized void setInitialMessagePacketSize(final int size)
-   {
-      checkWrite();
-      sessionFactory.setInitialMessagePacketSize(size);
-   }
-
-   public ClientSessionFactory getCoreFactory()
-   {
-      return sessionFactory;
-   }
-
-   public void setGroupID(final String groupID)
-   {
-      sessionFactory.setGroupID(groupID);
-   }
-
-   public String getGroupID()
-   {
-      return sessionFactory.getGroupID();
-   }
-
-   public void close()
-   {
-      sessionFactory.close();
-   }
-
-   // Package protected ----------------------------------------------------------------------------
-
-   // Protected ------------------------------------------------------------------------------------
-
-   protected synchronized HornetQConnection createConnectionInternal(final String username,
-                                                                     final String password,
-                                                                     final boolean isXA,
-                                                                     final int type) throws JMSException
-   {
-      readOnly = true;
-
-      // Note that each JMS connection gets it's own copy of the connection factory
-      // This means there is one underlying remoting connection per jms connection (if not load balanced)
-      ClientSessionFactory factory = sessionFactory.copy();
-
-      HornetQConnection connection = new HornetQConnection(username,
-                                                           password,
-                                                           type,
-                                                           clientID,
-                                                           dupsOKBatchSize,
-                                                           transactionBatchSize,
-                                                           factory);
-
-      try
-      {
-         connection.authorize();
-      }
-      catch (JMSException e)
-      {
-         try
-         {
-            connection.close();
-         }
-         catch (JMSException me)
-         {
-         }
-         throw e;
-      }
-
-      return connection;
-   }
-
-   // Private --------------------------------------------------------------------------------------
-
-   private void checkWrite()
-   {
-      if (readOnly)
-      {
-         throw new IllegalStateException("Cannot set attribute on HornetQConnectionFactory after it has been used");
-      }
-   }
-
-   // Inner classes --------------------------------------------------------------------------------
-
-}

Deleted: trunk/src/main/org/hornetq/jms/HornetQDestination.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQDestination.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQDestination.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,167 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import java.io.Serializable;
-
-import javax.jms.Destination;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.jms.referenceable.DestinationObjectFactory;
-import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
-
-/**
- * HornetQ implementation of a JMS Destination.
- * 
- * @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$</tt>
- *
- * $Id$
- */
-public abstract class HornetQDestination implements Destination, Serializable, Referenceable
-{
-   // Constants -----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   /**
-    * 
-    */
-   private static final long serialVersionUID = 5027962425462382883L;
-
-   protected static String escape(final String input)
-   {
-      if (input == null)
-      {
-         return "";
-      }
-      return input.replace("\\", "\\\\").replace(".", "\\.");
-   }
-
-   public static Destination fromAddress(final String address)
-   {
-      if (address.startsWith(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX))
-      {
-         String name = address.substring(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX.length());
-
-         return new HornetQQueue(address, name);
-      }
-      else if (address.startsWith(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX))
-      {
-         String name = address.substring(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX.length());
-
-         return new HornetQTopic(address, name);
-      }
-      else if (address.startsWith(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX))
-      {
-         String name = address.substring(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length());
-
-         return new HornetQTemporaryQueue(null, name);
-      }
-      else if (address.startsWith(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX))
-      {
-         String name = address.substring(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length());
-
-         return new HornetQTemporaryTopic(null, name);
-      }
-      else
-      {
-         throw new IllegalArgumentException("Invalid address " + address);
-      }
-   }
-
-   // Attributes ----------------------------------------------------
-
-   protected final String name;
-
-   private final String address;
-
-   private final SimpleString simpleAddress;
-
-   // Constructors --------------------------------------------------
-
-   public HornetQDestination(final String address, final String name)
-   {
-      this.address = address;
-
-      this.name = name;
-
-      simpleAddress = new SimpleString(address);
-   }
-
-   // Referenceable implementation ---------------------------------------
-
-   public Reference getReference() throws NamingException
-   {
-      return new Reference(this.getClass().getCanonicalName(),
-                           new SerializableObjectRefAddr("HornetQ-DEST", this),
-                           DestinationObjectFactory.class.getCanonicalName(),
-                           null);
-   }
-
-   // Public --------------------------------------------------------
-
-   public String getAddress()
-   {
-      return address;
-   }
-
-   public SimpleString getSimpleAddress()
-   {
-      return simpleAddress;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public abstract boolean isTemporary();
-
-   @Override
-   public boolean equals(final Object o)
-   {
-      if (this == o)
-      {
-         return true;
-      }
-
-      if (!(o instanceof HornetQDestination))
-      {
-         return false;
-      }
-
-      HornetQDestination that = (HornetQDestination)o;
-
-      return address.equals(that.address);
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return address.hashCode();
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Deleted: trunk/src/main/org/hornetq/jms/HornetQQueue.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQQueue.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQQueue.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,93 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import javax.jms.JMSException;
-import javax.jms.Queue;
-
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.jms.HornetQDestination;
-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$</tt>
- *
- * $Id$
- */
-public class HornetQQueue extends HornetQDestination implements Queue
-{
-   // Constants -----------------------------------------------------
-
-   private static final Logger log = Logger.getLogger(HornetQQueue.class);
-
-   private static final long serialVersionUID = -1106092883162295462L;
-
-   public static final String JMS_QUEUE_ADDRESS_PREFIX = "jms.queue.";
-
-   // 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);
-   }
-
-   protected HornetQQueue(final String address, final String name)
-   {
-      super(address, name);
-   }
-
-   // Queue implementation ------------------------------------------
-
-   public String getQueueName() throws JMSException
-   {
-      return name;
-   }
-
-   // Public --------------------------------------------------------
-
-   @Override
-   public boolean isTemporary()
-   {
-      return false;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "HornetQQueue[" + name + "]";
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Deleted: trunk/src/main/org/hornetq/jms/HornetQTemporaryQueue.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQTemporaryQueue.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQTemporaryQueue.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,82 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import javax.jms.JMSException;
-import javax.jms.TemporaryQueue;
-
-import org.hornetq.jms.client.HornetQSession;
-
-/**
- * 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;
-
-   public static final String JMS_TEMP_QUEUE_ADDRESS_PREFIX = "jms.tempqueue.";
-
-   // Static --------------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   private final transient HornetQSession session;
-
-   // Constructors --------------------------------------------------
-
-   public HornetQTemporaryQueue(final HornetQSession session, final String name)
-   {
-      super(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX + name, name);
-
-      this.session = session;
-   }
-
-   // TemporaryQueue implementation ------------------------------------------
-
-   public void delete() throws JMSException
-   {
-      session.deleteTemporaryQueue(this);
-   }
-
-   // Public --------------------------------------------------------
-
-   @Override
-   public boolean isTemporary()
-   {
-      return true;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "HornetQTemporaryQueue[" + name + "]";
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Deleted: trunk/src/main/org/hornetq/jms/HornetQTemporaryTopic.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQTemporaryTopic.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQTemporaryTopic.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,82 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import javax.jms.JMSException;
-import javax.jms.TemporaryTopic;
-
-import org.hornetq.jms.client.HornetQSession;
-
-/**
- * HornetQ implementation of a JMS TemporaryTopic.
- * <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 HornetQTemporaryTopic extends HornetQTopic implements TemporaryTopic
-{
-   // Constants -----------------------------------------------------
-
-   private static final long serialVersionUID = 845450764835635266L;
-
-   public static final String JMS_TEMP_TOPIC_ADDRESS_PREFIX = "jms.temptopic.";
-
-   // Static --------------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   private final transient HornetQSession session;
-
-   // Constructors --------------------------------------------------
-
-   public HornetQTemporaryTopic(final HornetQSession session, final String name)
-   {
-      super(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX + name, name);
-
-      this.session = session;
-   }
-
-   // TemporaryTopic implementation ------------------------------------------
-
-   public void delete() throws JMSException
-   {
-      session.deleteTemporaryTopic(this);
-   }
-
-   // Public --------------------------------------------------------
-
-   @Override
-   public boolean isTemporary()
-   {
-      return true;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "HornetQTemporaryTopic[" + name + "]";
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Deleted: trunk/src/main/org/hornetq/jms/HornetQTopic.java
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQTopic.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/HornetQTopic.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -1,146 +0,0 @@
-/*
- * Copyright 2009 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;
-
-import javax.jms.JMSException;
-import javax.jms.Topic;
-
-import org.hornetq.api.core.Pair;
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.jms.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$</tt>
- *
- * $Id$
- */
-public class HornetQTopic extends HornetQDestination implements Topic
-{
-   // Constants -----------------------------------------------------
-
-   private static final long serialVersionUID = 7873614001276404156L;
-
-   public static final String JMS_TOPIC_ADDRESS_PREFIX = "jms.topic.";
-
-   private static final char SEPARATOR = '.';
-
-   // Static --------------------------------------------------------
-
-   public static String createQueueNameForDurableSubscription(final String clientID, final String subscriptionName)
-   {
-      return HornetQDestination.escape(clientID) + HornetQTopic.SEPARATOR + HornetQDestination.escape(subscriptionName);
-   }
-
-   public static Pair<String, String> decomposeQueueNameForDurableSubscription(final String queueName)
-   {
-      StringBuffer[] parts = new StringBuffer[2];
-      int currentPart = 0;
-
-      parts[0] = new StringBuffer();
-      parts[1] = new StringBuffer();
-
-      int pos = 0;
-      while (pos < queueName.length())
-      {
-         char ch = queueName.charAt(pos);
-         pos++;
-
-         if (ch == HornetQTopic.SEPARATOR)
-         {
-            currentPart++;
-            if (currentPart >= parts.length)
-            {
-               throw new IllegalArgumentException("Invalid message queue name: " + queueName);
-            }
-
-            continue;
-         }
-
-         if (ch == '\\')
-         {
-            if (pos >= queueName.length())
-            {
-               throw new IllegalArgumentException("Invalid message queue name: " + queueName);
-            }
-            ch = queueName.charAt(pos);
-            pos++;
-         }
-
-         parts[currentPart].append(ch);
-      }
-
-      if (currentPart != 1)
-      {
-         throw new IllegalArgumentException("Invalid message queue name: " + queueName);
-      }
-
-      Pair<String, String> pair = new Pair<String, String>(parts[0].toString(), parts[1].toString());
-
-      return pair;
-   }
-
-   public static SimpleString createAddressFromName(final String name)
-   {
-      return new SimpleString(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX + name);
-   }
-
-   // Attributes ----------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   public HornetQTopic(final String name)
-   {
-      super(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX + name, name);
-   }
-
-   protected HornetQTopic(final String address, final String name)
-   {
-      super(address, name);
-   }
-
-   // Topic implementation ------------------------------------------
-
-   public String getTopicName() throws JMSException
-   {
-      return name;
-   }
-
-   // Public --------------------------------------------------------
-
-   @Override
-   public boolean isTemporary()
-   {
-      return false;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "HornetQTopic[" + name + "]";
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,631 @@
+/*
+ * Copyright 2009 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 java.io.Serializable;
+import java.util.List;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.XAConnection;
+import javax.jms.XAConnectionFactory;
+import javax.jms.XAQueueConnection;
+import javax.jms.XAQueueConnectionFactory;
+import javax.jms.XATopicConnection;
+import javax.jms.XATopicConnectionFactory;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+
+import org.hornetq.api.core.Pair;
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
+import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
+
+/**
+ * HornetQ implementation of a JMS ConnectionFactory.
+ * 
+ * @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$</tt> $Id$
+ */
+public class HornetQConnectionFactory implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory,
+         XAConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory, Serializable, Referenceable
+{
+   // Constants ------------------------------------------------------------------------------------
+
+   private final static long serialVersionUID = -2810634789345348326L;
+
+   private static final Logger log = Logger.getLogger(HornetQConnectionFactory.class);
+
+   // Static ---------------------------------------------------------------------------------------
+
+   // Attributes -----------------------------------------------------------------------------------
+
+   private final ClientSessionFactory sessionFactory;
+
+   private String clientID;
+
+   private int dupsOKBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE;
+
+   private int transactionBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE;
+
+   private boolean readOnly;
+
+   // Constructors ---------------------------------------------------------------------------------
+
+   public HornetQConnectionFactory()
+   {
+      sessionFactory = HornetQClient.createClientSessionFactory();
+   }
+
+   public HornetQConnectionFactory(final ClientSessionFactory sessionFactory)
+   {
+      this.sessionFactory = sessionFactory;
+   }
+
+   public HornetQConnectionFactory(final String discoveryAddress, final int discoveryPort)
+   {
+      sessionFactory = HornetQClient.createClientSessionFactory(discoveryAddress, discoveryPort);
+   }
+
+   public HornetQConnectionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
+   {
+      sessionFactory = HornetQClient.createClientSessionFactory(staticConnectors);
+   }
+
+   public HornetQConnectionFactory(final TransportConfiguration connectorConfig,
+                                   final TransportConfiguration backupConnectorConfig)
+   {
+      sessionFactory = HornetQClient.createClientSessionFactory(connectorConfig, backupConnectorConfig);
+   }
+
+   public HornetQConnectionFactory(final TransportConfiguration connectorConfig)
+   {
+      this(connectorConfig, null);
+   }
+
+   // ConnectionFactory implementation -------------------------------------------------------------
+
+   public Connection createConnection() throws JMSException
+   {
+      return createConnection(null, null);
+   }
+
+   public Connection createConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_GENERIC_CONNECTION);
+   }
+
+   // QueueConnectionFactory implementation --------------------------------------------------------
+
+   public QueueConnection createQueueConnection() throws JMSException
+   {
+      return createQueueConnection(null, null);
+   }
+
+   public QueueConnection createQueueConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_QUEUE_CONNECTION);
+   }
+
+   // TopicConnectionFactory implementation --------------------------------------------------------
+
+   public TopicConnection createTopicConnection() throws JMSException
+   {
+      return createTopicConnection(null, null);
+   }
+
+   public TopicConnection createTopicConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, false, HornetQConnection.TYPE_TOPIC_CONNECTION);
+   }
+
+   // XAConnectionFactory implementation -----------------------------------------------------------
+
+   public XAConnection createXAConnection() throws JMSException
+   {
+      return createXAConnection(null, null);
+   }
+
+   public XAConnection createXAConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_GENERIC_CONNECTION);
+   }
+
+   // XAQueueConnectionFactory implementation ------------------------------------------------------
+
+   public XAQueueConnection createXAQueueConnection() throws JMSException
+   {
+      return createXAQueueConnection(null, null);
+   }
+
+   public XAQueueConnection createXAQueueConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_QUEUE_CONNECTION);
+   }
+
+   // XATopicConnectionFactory implementation ------------------------------------------------------
+
+   public XATopicConnection createXATopicConnection() throws JMSException
+   {
+      return createXATopicConnection(null, null);
+   }
+
+   public XATopicConnection createXATopicConnection(final String username, final String password) throws JMSException
+   {
+      return createConnectionInternal(username, password, true, HornetQConnection.TYPE_TOPIC_CONNECTION);
+   }
+
+   // Referenceable implementation -----------------------------------------------------------------
+
+   public Reference getReference() throws NamingException
+   {
+      return new Reference(this.getClass().getCanonicalName(),
+                           new SerializableObjectRefAddr("HornetQ-CF", this),
+                           ConnectionFactoryObjectFactory.class.getCanonicalName(),
+                           null);
+   }
+
+   // Public ---------------------------------------------------------------------------------------
+
+   public synchronized String getConnectionLoadBalancingPolicyClassName()
+   {
+      return sessionFactory.getConnectionLoadBalancingPolicyClassName();
+   }
+
+   public synchronized void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName)
+   {
+      checkWrite();
+      sessionFactory.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
+   }
+
+   public synchronized List<Pair<TransportConfiguration, TransportConfiguration>> getStaticConnectors()
+   {
+      return sessionFactory.getStaticConnectors();
+   }
+
+   public synchronized void setStaticConnectors(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
+   {
+      checkWrite();
+      sessionFactory.setStaticConnectors(staticConnectors);
+   }
+
+   public synchronized String getDiscoveryAddress()
+   {
+      return sessionFactory.getDiscoveryAddress();
+   }
+
+   public synchronized void setDiscoveryAddress(final String discoveryAddress)
+   {
+      checkWrite();
+      sessionFactory.setDiscoveryAddress(discoveryAddress);
+   }
+
+   public synchronized int getDiscoveryPort()
+   {
+      return sessionFactory.getDiscoveryPort();
+   }
+
+   public synchronized void setDiscoveryPort(final int discoveryPort)
+   {
+      checkWrite();
+      sessionFactory.setDiscoveryPort(discoveryPort);
+   }
+
+   public synchronized long getDiscoveryRefreshTimeout()
+   {
+      return sessionFactory.getDiscoveryRefreshTimeout();
+   }
+
+   public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
+   {
+      checkWrite();
+      sessionFactory.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+   }
+
+   public synchronized long getDiscoveryInitialWaitTimeout()
+   {
+      return sessionFactory.getDiscoveryInitialWaitTimeout();
+   }
+
+   public synchronized void setDiscoveryInitialWaitTimeout(final long discoveryInitialWaitTimeout)
+   {
+      checkWrite();
+      sessionFactory.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
+   }
+
+   public synchronized String getClientID()
+   {
+      return clientID;
+   }
+
+   public synchronized void setClientID(final String clientID)
+   {
+      checkWrite();
+      this.clientID = clientID;
+   }
+
+   public synchronized int getDupsOKBatchSize()
+   {
+      return dupsOKBatchSize;
+   }
+
+   public synchronized void setDupsOKBatchSize(final int dupsOKBatchSize)
+   {
+      checkWrite();
+      this.dupsOKBatchSize = dupsOKBatchSize;
+   }
+
+   public synchronized int getTransactionBatchSize()
+   {
+      return transactionBatchSize;
+   }
+
+   public synchronized void setTransactionBatchSize(final int transactionBatchSize)
+   {
+      checkWrite();
+      this.transactionBatchSize = transactionBatchSize;
+   }
+
+   public synchronized long getClientFailureCheckPeriod()
+   {
+      return sessionFactory.getClientFailureCheckPeriod();
+   }
+
+   public synchronized void setClientFailureCheckPeriod(final long clientFailureCheckPeriod)
+   {
+      checkWrite();
+      sessionFactory.setClientFailureCheckPeriod(clientFailureCheckPeriod);
+   }
+
+   public synchronized long getConnectionTTL()
+   {
+      return sessionFactory.getConnectionTTL();
+   }
+
+   public synchronized void setConnectionTTL(final long connectionTTL)
+   {
+      checkWrite();
+      sessionFactory.setConnectionTTL(connectionTTL);
+   }
+
+   public synchronized long getCallTimeout()
+   {
+      return sessionFactory.getCallTimeout();
+   }
+
+   public synchronized void setCallTimeout(final long callTimeout)
+   {
+      checkWrite();
+      sessionFactory.setCallTimeout(callTimeout);
+   }
+
+   public synchronized int getConsumerWindowSize()
+   {
+      return sessionFactory.getConsumerWindowSize();
+   }
+
+   public synchronized void setConsumerWindowSize(final int consumerWindowSize)
+   {
+      checkWrite();
+      sessionFactory.setConsumerWindowSize(consumerWindowSize);
+   }
+
+   public synchronized int getConsumerMaxRate()
+   {
+      return sessionFactory.getConsumerMaxRate();
+   }
+
+   public synchronized void setConsumerMaxRate(final int consumerMaxRate)
+   {
+      checkWrite();
+      sessionFactory.setConsumerMaxRate(consumerMaxRate);
+   }
+
+   public synchronized int getConfirmationWindowSize()
+   {
+      return sessionFactory.getConfirmationWindowSize();
+   }
+
+   public synchronized void setConfirmationWindowSize(final int confirmationWindowSize)
+   {
+      checkWrite();
+      sessionFactory.setConfirmationWindowSize(confirmationWindowSize);
+   }
+
+   public synchronized int getProducerMaxRate()
+   {
+      return sessionFactory.getProducerMaxRate();
+   }
+
+   public synchronized void setProducerMaxRate(final int producerMaxRate)
+   {
+      checkWrite();
+      sessionFactory.setProducerMaxRate(producerMaxRate);
+   }
+
+   public synchronized int getProducerWindowSize()
+   {
+      return sessionFactory.getProducerWindowSize();
+   }
+
+   public synchronized void setProducerWindowSize(final int producerWindowSize)
+   {
+      checkWrite();
+      sessionFactory.setProducerWindowSize(producerWindowSize);
+   }
+
+   /**
+    * @param cacheLargeMessagesClient
+    */
+   public synchronized void setCacheLargeMessagesClient(final boolean cacheLargeMessagesClient)
+   {
+      checkWrite();
+      sessionFactory.setCacheLargeMessagesClient(cacheLargeMessagesClient);
+   }
+
+   public synchronized boolean isCacheLargeMessagesClient()
+   {
+      return sessionFactory.isCacheLargeMessagesClient();
+   }
+
+   public synchronized int getMinLargeMessageSize()
+   {
+      return sessionFactory.getMinLargeMessageSize();
+   }
+
+   public synchronized void setMinLargeMessageSize(final int minLargeMessageSize)
+   {
+      checkWrite();
+      sessionFactory.setMinLargeMessageSize(minLargeMessageSize);
+   }
+
+   public synchronized boolean isBlockOnAcknowledge()
+   {
+      return sessionFactory.isBlockOnAcknowledge();
+   }
+
+   public synchronized void setBlockOnAcknowledge(final boolean blockOnAcknowledge)
+   {
+      checkWrite();
+      sessionFactory.setBlockOnAcknowledge(blockOnAcknowledge);
+   }
+
+   public synchronized boolean isBlockOnNonDurableSend()
+   {
+      return sessionFactory.isBlockOnNonDurableSend();
+   }
+
+   public synchronized void setBlockOnNonDurableSend(final boolean blockOnNonDurableSend)
+   {
+      checkWrite();
+      sessionFactory.setBlockOnNonDurableSend(blockOnNonDurableSend);
+   }
+
+   public synchronized boolean isBlockOnDurableSend()
+   {
+      return sessionFactory.isBlockOnDurableSend();
+   }
+
+   public synchronized void setBlockOnDurableSend(final boolean blockOnDurableSend)
+   {
+      checkWrite();
+      sessionFactory.setBlockOnDurableSend(blockOnDurableSend);
+   }
+
+   public synchronized boolean isAutoGroup()
+   {
+      return sessionFactory.isAutoGroup();
+   }
+
+   public synchronized void setAutoGroup(final boolean autoGroup)
+   {
+      checkWrite();
+      sessionFactory.setAutoGroup(autoGroup);
+   }
+
+   public synchronized boolean isPreAcknowledge()
+   {
+      return sessionFactory.isPreAcknowledge();
+   }
+
+   public synchronized void setPreAcknowledge(final boolean preAcknowledge)
+   {
+      checkWrite();
+      sessionFactory.setPreAcknowledge(preAcknowledge);
+   }
+
+   public synchronized long getRetryInterval()
+   {
+      return sessionFactory.getRetryInterval();
+   }
+
+   public synchronized void setRetryInterval(final long retryInterval)
+   {
+      checkWrite();
+      sessionFactory.setRetryInterval(retryInterval);
+   }
+
+   public synchronized long getMaxRetryInterval()
+   {
+      return sessionFactory.getMaxRetryInterval();
+   }
+
+   public synchronized void setMaxRetryInterval(final long retryInterval)
+   {
+      checkWrite();
+      sessionFactory.setMaxRetryInterval(retryInterval);
+   }
+
+   public synchronized double getRetryIntervalMultiplier()
+   {
+      return sessionFactory.getRetryIntervalMultiplier();
+   }
+
+   public synchronized void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
+   {
+      checkWrite();
+      sessionFactory.setRetryIntervalMultiplier(retryIntervalMultiplier);
+   }
+
+   public synchronized int getReconnectAttempts()
+   {
+      return sessionFactory.getReconnectAttempts();
+   }
+
+   public synchronized void setReconnectAttempts(final int reconnectAttempts)
+   {
+      checkWrite();
+      sessionFactory.setReconnectAttempts(reconnectAttempts);
+   }
+
+   public synchronized boolean isFailoverOnServerShutdown()
+   {
+      return sessionFactory.isFailoverOnServerShutdown();
+   }
+
+   public synchronized void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
+   {
+      checkWrite();
+      sessionFactory.setFailoverOnServerShutdown(failoverOnServerShutdown);
+   }
+
+   public synchronized boolean isUseGlobalPools()
+   {
+      return sessionFactory.isUseGlobalPools();
+   }
+
+   public synchronized void setUseGlobalPools(final boolean useGlobalPools)
+   {
+      checkWrite();
+      sessionFactory.setUseGlobalPools(useGlobalPools);
+   }
+
+   public synchronized int getScheduledThreadPoolMaxSize()
+   {
+      return sessionFactory.getScheduledThreadPoolMaxSize();
+   }
+
+   public synchronized void setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize)
+   {
+      checkWrite();
+      sessionFactory.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
+   }
+
+   public synchronized int getThreadPoolMaxSize()
+   {
+      return sessionFactory.getThreadPoolMaxSize();
+   }
+
+   public synchronized void setThreadPoolMaxSize(final int threadPoolMaxSize)
+   {
+      checkWrite();
+      sessionFactory.setThreadPoolMaxSize(threadPoolMaxSize);
+   }
+
+   public synchronized int getInitialMessagePacketSize()
+   {
+      return sessionFactory.getInitialMessagePacketSize();
+   }
+
+   public synchronized void setInitialMessagePacketSize(final int size)
+   {
+      checkWrite();
+      sessionFactory.setInitialMessagePacketSize(size);
+   }
+
+   public ClientSessionFactory getCoreFactory()
+   {
+      return sessionFactory;
+   }
+
+   public void setGroupID(final String groupID)
+   {
+      sessionFactory.setGroupID(groupID);
+   }
+
+   public String getGroupID()
+   {
+      return sessionFactory.getGroupID();
+   }
+
+   public void close()
+   {
+      sessionFactory.close();
+   }
+
+   // Package protected ----------------------------------------------------------------------------
+
+   // Protected ------------------------------------------------------------------------------------
+
+   protected synchronized HornetQConnection createConnectionInternal(final String username,
+                                                                     final String password,
+                                                                     final boolean isXA,
+                                                                     final int type) throws JMSException
+   {
+      readOnly = true;
+
+      // Note that each JMS connection gets it's own copy of the connection factory
+      // This means there is one underlying remoting connection per jms connection (if not load balanced)
+      ClientSessionFactory factory = sessionFactory.copy();
+
+      HornetQConnection connection = new HornetQConnection(username,
+                                                           password,
+                                                           type,
+                                                           clientID,
+                                                           dupsOKBatchSize,
+                                                           transactionBatchSize,
+                                                           factory);
+
+      try
+      {
+         connection.authorize();
+      }
+      catch (JMSException e)
+      {
+         try
+         {
+            connection.close();
+         }
+         catch (JMSException me)
+         {
+         }
+         throw e;
+      }
+
+      return connection;
+   }
+
+   // Private --------------------------------------------------------------------------------------
+
+   private void checkWrite()
+   {
+      if (readOnly)
+      {
+         throw new IllegalStateException("Cannot set attribute on HornetQConnectionFactory after it has been used");
+      }
+   }
+
+   // Inner classes --------------------------------------------------------------------------------
+
+}

Copied: trunk/src/main/org/hornetq/jms/client/HornetQDestination.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQDestination.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQDestination.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQDestination.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2009 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 java.io.Serializable;
+
+import javax.jms.Destination;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.jms.referenceable.DestinationObjectFactory;
+import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
+
+/**
+ * HornetQ implementation of a JMS Destination.
+ * 
+ * @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$</tt>
+ *
+ * $Id$
+ */
+public abstract class HornetQDestination implements Destination, Serializable, Referenceable
+{
+   // Constants -----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   /**
+    * 
+    */
+   private static final long serialVersionUID = 5027962425462382883L;
+
+   protected static String escape(final String input)
+   {
+      if (input == null)
+      {
+         return "";
+      }
+      return input.replace("\\", "\\\\").replace(".", "\\.");
+   }
+
+   public static Destination fromAddress(final String address)
+   {
+      if (address.startsWith(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX))
+      {
+         String name = address.substring(HornetQQueue.JMS_QUEUE_ADDRESS_PREFIX.length());
+
+         return new HornetQQueue(address, name);
+      }
+      else if (address.startsWith(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX))
+      {
+         String name = address.substring(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX.length());
+
+         return new HornetQTopic(address, name);
+      }
+      else if (address.startsWith(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX))
+      {
+         String name = address.substring(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length());
+
+         return new HornetQTemporaryQueue(null, name);
+      }
+      else if (address.startsWith(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX))
+      {
+         String name = address.substring(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length());
+
+         return new HornetQTemporaryTopic(null, name);
+      }
+      else
+      {
+         throw new IllegalArgumentException("Invalid address " + address);
+      }
+   }
+
+   // Attributes ----------------------------------------------------
+
+   protected final String name;
+
+   private final String address;
+
+   private final SimpleString simpleAddress;
+
+   // Constructors --------------------------------------------------
+
+   public HornetQDestination(final String address, final String name)
+   {
+      this.address = address;
+
+      this.name = name;
+
+      simpleAddress = new SimpleString(address);
+   }
+
+   // Referenceable implementation ---------------------------------------
+
+   public Reference getReference() throws NamingException
+   {
+      return new Reference(this.getClass().getCanonicalName(),
+                           new SerializableObjectRefAddr("HornetQ-DEST", this),
+                           DestinationObjectFactory.class.getCanonicalName(),
+                           null);
+   }
+
+   // Public --------------------------------------------------------
+
+   public String getAddress()
+   {
+      return address;
+   }
+
+   public SimpleString getSimpleAddress()
+   {
+      return simpleAddress;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public abstract boolean isTemporary();
+
+   @Override
+   public boolean equals(final Object o)
+   {
+      if (this == o)
+      {
+         return true;
+      }
+
+      if (!(o instanceof HornetQDestination))
+      {
+         return false;
+      }
+
+      HornetQDestination that = (HornetQDestination)o;
+
+      return address.equals(that.address);
+   }
+
+   @Override
+   public int hashCode()
+   {
+      return address.hashCode();
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Modified: trunk/src/main/org/hornetq/jms/client/HornetQMessage.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQMessage.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/client/HornetQMessage.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -39,7 +39,6 @@
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.client.ClientMessage;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQDestination;
 import org.hornetq.api.jms.HornetQMessageConstants;
 import org.hornetq.core.client.impl.ClientMessageImpl;
 import org.hornetq.core.logging.Logger;

Modified: trunk/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/client/HornetQMessageConsumer.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -29,7 +29,6 @@
 import org.hornetq.api.core.client.ClientConsumer;
 import org.hornetq.api.core.client.ClientMessage;
 import org.hornetq.api.core.client.MessageHandler;
-import org.hornetq.jms.HornetQDestination;
 import org.hornetq.core.logging.Logger;
 
 /**

Modified: trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/client/HornetQMessageProducer.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -35,7 +35,6 @@
 import org.hornetq.api.core.client.ClientMessage;
 import org.hornetq.api.core.client.ClientProducer;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQDestination;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.utils.UUIDGenerator;
 

Copied: trunk/src/main/org/hornetq/jms/client/HornetQQueue.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQQueue.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueue.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueue.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2009 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.Queue;
+
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.jms.client.HornetQDestination;
+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$</tt>
+ *
+ * $Id$
+ */
+public class HornetQQueue extends HornetQDestination implements Queue
+{
+   // Constants -----------------------------------------------------
+
+   private static final Logger log = Logger.getLogger(HornetQQueue.class);
+
+   private static final long serialVersionUID = -1106092883162295462L;
+
+   public static final String JMS_QUEUE_ADDRESS_PREFIX = "jms.queue.";
+
+   // 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);
+   }
+
+   protected HornetQQueue(final String address, final String name)
+   {
+      super(address, name);
+   }
+
+   // Queue implementation ------------------------------------------
+
+   public String getQueueName() throws JMSException
+   {
+      return name;
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public boolean isTemporary()
+   {
+      return false;
+   }
+
+   @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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueueBrowser.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -25,7 +25,6 @@
 import org.hornetq.api.core.client.ClientConsumer;
 import org.hornetq.api.core.client.ClientMessage;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.core.logging.Logger;
 
 /**

Copied: trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQTemporaryQueue.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTemporaryQueue.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2009 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;
+
+   public static final String JMS_TEMP_QUEUE_ADDRESS_PREFIX = "jms.tempqueue.";
+
+   // Static --------------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   private final transient HornetQSession session;
+
+   // Constructors --------------------------------------------------
+
+   public HornetQTemporaryQueue(final HornetQSession session, final String name)
+   {
+      super(HornetQTemporaryQueue.JMS_TEMP_QUEUE_ADDRESS_PREFIX + name, name);
+
+      this.session = session;
+   }
+
+   // TemporaryQueue implementation ------------------------------------------
+
+   public void delete() throws JMSException
+   {
+      session.deleteTemporaryQueue(this);
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public boolean isTemporary()
+   {
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "HornetQTemporaryQueue[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Copied: trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQTemporaryTopic.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTemporaryTopic.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2009 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.TemporaryTopic;
+
+
+/**
+ * HornetQ implementation of a JMS TemporaryTopic.
+ * <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 HornetQTemporaryTopic extends HornetQTopic implements TemporaryTopic
+{
+   // Constants -----------------------------------------------------
+
+   private static final long serialVersionUID = 845450764835635266L;
+
+   public static final String JMS_TEMP_TOPIC_ADDRESS_PREFIX = "jms.temptopic.";
+
+   // Static --------------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   private final transient HornetQSession session;
+
+   // Constructors --------------------------------------------------
+
+   public HornetQTemporaryTopic(final HornetQSession session, final String name)
+   {
+      super(HornetQTemporaryTopic.JMS_TEMP_TOPIC_ADDRESS_PREFIX + name, name);
+
+      this.session = session;
+   }
+
+   // TemporaryTopic implementation ------------------------------------------
+
+   public void delete() throws JMSException
+   {
+      session.deleteTemporaryTopic(this);
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public boolean isTemporary()
+   {
+      return true;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "HornetQTemporaryTopic[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Copied: trunk/src/main/org/hornetq/jms/client/HornetQTopic.java (from rev 8735, trunk/src/main/org/hornetq/jms/HornetQTopic.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTopic.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTopic.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2009 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$</tt>
+ *
+ * $Id$
+ */
+public class HornetQTopic extends HornetQDestination implements Topic
+{
+   // Constants -----------------------------------------------------
+
+   private static final long serialVersionUID = 7873614001276404156L;
+
+   public static final String JMS_TOPIC_ADDRESS_PREFIX = "jms.topic.";
+
+   private static final char SEPARATOR = '.';
+
+   // Static --------------------------------------------------------
+
+   public static String createQueueNameForDurableSubscription(final String clientID, final String subscriptionName)
+   {
+      return HornetQDestination.escape(clientID) + HornetQTopic.SEPARATOR + HornetQDestination.escape(subscriptionName);
+   }
+
+   public static Pair<String, String> decomposeQueueNameForDurableSubscription(final String queueName)
+   {
+      StringBuffer[] parts = new StringBuffer[2];
+      int currentPart = 0;
+
+      parts[0] = new StringBuffer();
+      parts[1] = new StringBuffer();
+
+      int pos = 0;
+      while (pos < queueName.length())
+      {
+         char ch = queueName.charAt(pos);
+         pos++;
+
+         if (ch == HornetQTopic.SEPARATOR)
+         {
+            currentPart++;
+            if (currentPart >= parts.length)
+            {
+               throw new IllegalArgumentException("Invalid message queue name: " + queueName);
+            }
+
+            continue;
+         }
+
+         if (ch == '\\')
+         {
+            if (pos >= queueName.length())
+            {
+               throw new IllegalArgumentException("Invalid message queue name: " + queueName);
+            }
+            ch = queueName.charAt(pos);
+            pos++;
+         }
+
+         parts[currentPart].append(ch);
+      }
+
+      if (currentPart != 1)
+      {
+         throw new IllegalArgumentException("Invalid message queue name: " + queueName);
+      }
+
+      Pair<String, String> pair = new Pair<String, String>(parts[0].toString(), parts[1].toString());
+
+      return pair;
+   }
+
+   public static SimpleString createAddressFromName(final String name)
+   {
+      return new SimpleString(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX + name);
+   }
+
+   // Attributes ----------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   public HornetQTopic(final String name)
+   {
+      super(HornetQTopic.JMS_TOPIC_ADDRESS_PREFIX + name, name);
+   }
+
+   protected HornetQTopic(final String address, final String name)
+   {
+      super(address, name);
+   }
+
+   // Topic implementation ------------------------------------------
+
+   public String getTopicName() throws JMSException
+   {
+      return name;
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public boolean isTemporary()
+   {
+      return false;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "HornetQTopic[" + name + "]";
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}

Modified: trunk/src/main/org/hornetq/jms/client/package-info.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/package-info.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/client/package-info.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -15,7 +15,7 @@
  * Implementation of the JMS API.
  * <br>
  * Classes in this package are not meant to be used directly 
- * except {@link org.hornetq.jms.HornetQConnectionFactory} which can be instantiated directly
+ * except {@link org.hornetq.jms.client.HornetQConnectionFactory} which can be instantiated directly
  * if JMS resources are not looked up in JNDI.
  * 
  */

Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -19,7 +19,7 @@
 import javax.management.NotCompliantMBeanException;
 import javax.management.StandardMBean;
 
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.api.jms.management.ConnectionFactoryControl;
 import org.hornetq.core.management.impl.MBeanInfoHelper;
 

Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSQueueControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSQueueControlImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSQueueControlImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -22,13 +22,13 @@
 import org.hornetq.api.core.management.MessageCounterInfo;
 import org.hornetq.api.core.management.QueueControl;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.impl.MBeanInfoHelper;
 import org.hornetq.core.messagecounter.MessageCounter;
 import org.hornetq.core.messagecounter.impl.MessageCounterHelper;
 import org.hornetq.jms.client.HornetQMessage;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.client.SelectorTranslator;
 import org.hornetq.utils.json.JSONArray;
 import org.hornetq.utils.json.JSONObject;

Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -27,12 +27,12 @@
 import org.hornetq.api.core.management.HornetQServerControl;
 import org.hornetq.api.core.management.QueueControl;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.api.jms.management.TopicControl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.impl.MBeanInfoHelper;
 import org.hornetq.core.server.management.ManagementService;
 import org.hornetq.jms.client.HornetQMessage;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.client.SelectorTranslator;
 import org.hornetq.utils.json.JSONArray;
 import org.hornetq.utils.json.JSONObject;

Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -28,16 +28,16 @@
 
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.core.deployers.DeploymentManager;
 import org.hornetq.core.deployers.impl.FileDeploymentManager;
 import org.hornetq.core.deployers.impl.XmlDeployer;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.ActivateCallback;
 import org.hornetq.core.server.HornetQServer;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.client.SelectorTranslator;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;

Modified: trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -15,10 +15,10 @@
 
 import java.util.List;
 
-import org.hornetq.jms.HornetQConnectionFactory;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.api.jms.management.JMSServerControl;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.jms.server.JMSServerManager;
 
 /**

Modified: trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -20,9 +20,6 @@
 import org.hornetq.api.core.management.AddressControl;
 import org.hornetq.api.core.management.QueueControl;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQConnectionFactory;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.api.jms.management.ConnectionFactoryControl;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.api.jms.management.JMSServerControl;
@@ -30,6 +27,9 @@
 import org.hornetq.core.messagecounter.MessageCounter;
 import org.hornetq.core.messagecounter.MessageCounterManager;
 import org.hornetq.core.server.management.ManagementService;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+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;

Modified: trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -28,7 +28,7 @@
 import javax.security.auth.Subject;
 
 import org.hornetq.core.logging.Logger;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * HornetQ ManagedConectionFactory

Modified: trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -32,7 +32,7 @@
 import org.hornetq.api.core.client.ClientSession;
 import org.hornetq.api.core.client.ClientSessionFactory;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.ra.inflow.HornetQActivation;

Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -31,8 +31,8 @@
 
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQConnectionFactory;
-import org.hornetq.jms.HornetQDestination;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQDestination;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.ra.HornetQResourceAdapter;

Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -27,9 +27,9 @@
 import org.hornetq.api.core.client.ClientSession;
 import org.hornetq.api.core.client.MessageHandler;
 import org.hornetq.api.core.client.ClientSession.QueueQuery;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.jms.client.HornetQMessage;
+import org.hornetq.jms.client.HornetQTopic;
 
 /**
  * The message handler

Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -24,7 +24,7 @@
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * Safeguards for previously detected TCK failures.

Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -21,7 +21,7 @@
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -25,9 +25,9 @@
 import javax.naming.Reference;
 import javax.naming.Referenceable;
 
-import org.hornetq.jms.HornetQConnectionFactory;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+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;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -19,7 +19,6 @@
 
 import org.hornetq.api.core.HornetQException;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
@@ -28,6 +27,7 @@
 import org.hornetq.core.remoting.RemotingConnection;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.integration.jms.server.management.NullInitialContext;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -27,7 +27,7 @@
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSessionFactory;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -36,7 +36,6 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.api.jms.management.TopicControl;
@@ -51,6 +50,7 @@
 import org.hornetq.jms.bridge.ConnectionFactoryFactory;
 import org.hornetq.jms.bridge.DestinationFactory;
 import org.hornetq.jms.bridge.QualityOfServiceMode;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQMessage;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -33,9 +33,7 @@
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -45,6 +43,8 @@
 import org.hornetq.core.remoting.impl.invm.TransportConstants;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -32,10 +32,7 @@
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -44,7 +41,10 @@
 import org.hornetq.core.remoting.impl.invm.InVMRegistry;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.client.HornetQSession;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseConnectionOnGCTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseConnectionOnGCTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseConnectionOnGCTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -23,7 +23,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.CloseListener;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -23,11 +23,11 @@
 
 import org.hornetq.api.core.HornetQException;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.RemotingConnection;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.tests.util.JMSTestBase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -24,7 +24,6 @@
 
 import org.hornetq.api.core.HornetQException;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
@@ -32,6 +31,7 @@
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
 import org.hornetq.jms.client.HornetQConnection;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.integration.jms.server.management.NullInitialContext;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/consumer/ConsumerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/consumer/ConsumerTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/consumer/ConsumerTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -25,11 +25,11 @@
 
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.Queue;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.tests.util.JMSTestBase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -27,7 +27,7 @@
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.server.cluster.DivertConfiguration;
 import org.hornetq.tests.util.JMSTestBase;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -22,7 +22,6 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.deployers.DeploymentManager;
@@ -30,6 +29,7 @@
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.impl.JMSServerDeployer;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -23,13 +23,13 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.config.impl.FileConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.impl.HornetQServerImpl;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.spi.core.security.HornetQSecurityManager;

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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -29,9 +29,7 @@
 
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -40,6 +38,8 @@
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
 import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+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;

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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -21,11 +21,10 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.api.jms.management.JMSQueueControl;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 
 /**
@@ -78,7 +77,7 @@
    @Override
    protected JMSQueueControl createManagementControl() throws Exception
    {
-      HornetQQueue managementQueue = (HornetQQueue)HornetQJMSClient.createQueue(ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS.toString());
+      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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -21,9 +21,9 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.api.jms.management.JMSServerControl;
 import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -27,7 +27,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.tests.util.RandomUtil;

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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -23,7 +23,6 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.api.jms.management.SubscriptionInfo;
 import org.hornetq.api.jms.management.TopicControl;
 import org.hornetq.core.config.Configuration;
@@ -31,6 +30,7 @@
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
+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;

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-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -23,15 +23,15 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.management.ResourceNames;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.HornetQServers;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+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.util.RandomUtil;

Modified: trunk/tests/src/org/hornetq/tests/opt/SendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/opt/SendTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/opt/SendTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -29,7 +29,6 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -41,6 +40,7 @@
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.integration.transports.netty.TransportConstants;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQMessage;
 import org.hornetq.jms.client.HornetQSession;
 import org.hornetq.tests.util.RandomUtil;

Modified: trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -41,7 +41,6 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -53,6 +52,7 @@
 import org.hornetq.jms.bridge.DestinationFactory;
 import org.hornetq.jms.bridge.QualityOfServiceMode;
 import org.hornetq.jms.bridge.impl.JMSBridgeImpl;
+import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;

Modified: trunk/tests/src/org/hornetq/tests/unit/jms/HornetQDestinationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/HornetQDestinationTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/HornetQDestinationTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -20,10 +20,12 @@
 
 import junit.framework.Assert;
 
-import org.hornetq.jms.HornetQDestination;
-import org.hornetq.jms.HornetQQueue;
 import org.hornetq.jms.*;
-import org.hornetq.jms.HornetQTopic;
+import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
+import org.hornetq.jms.client.HornetQTemporaryQueue;
+import org.hornetq.jms.client.HornetQTemporaryTopic;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/unit/jms/HornetQQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/HornetQQueueTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/HornetQQueueTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -16,7 +16,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/unit/jms/HornetQTopicTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/HornetQTopicTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/HornetQTopicTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -17,7 +17,7 @@
 
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQTopic;
+import org.hornetq.jms.client.HornetQTopic;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -17,9 +17,9 @@
 
 import junit.framework.Assert;
 
-import org.hornetq.jms.HornetQDestination;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.jms.referenceable.DestinationObjectFactory;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java	2010-01-06 12:38:23 UTC (rev 8736)
+++ trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java	2010-01-06 12:41:30 UTC (rev 8737)
@@ -34,9 +34,9 @@
 import org.hornetq.api.core.client.ClientSession;
 import org.hornetq.api.core.client.ClientSessionFactory;
 import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.client.HornetQQueue;
 import org.hornetq.core.remoting.impl.invm.InVMConnector;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyConnector;



More information about the hornetq-commits mailing list