[hornetq-commits] JBoss hornetq SVN: r8711 - in trunk: examples/core/embedded-remote/src/org/hornetq/core/example and 73 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 5 05:23:20 EST 2010


Author: jmesnil
Date: 2010-01-05 05:23:17 -0500 (Tue, 05 Jan 2010)
New Revision: 8711

Added:
   trunk/src/main/org/hornetq/core/client/ClientSessionFactoryImpl.java
   trunk/src/main/org/hornetq/core/client/loadbalance/
   trunk/src/main/org/hornetq/core/client/loadbalance/ConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/config/ConfigurationImpl.java
   trunk/src/main/org/hornetq/core/config/FileConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java
   trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java
   trunk/src/main/org/hornetq/jms/server/JMSServerManagerImpl.java
Removed:
   trunk/src/main/org/hornetq/core/client/ConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
   trunk/src/main/org/hornetq/core/client/impl/FirstElementConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/impl/RandomConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/client/impl/RoundRobinConnectionLoadBalancingPolicy.java
   trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java
   trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java
   trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
   trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java
   trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
   trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
Modified:
   trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedRemoteExample.java
   trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedServer.java
   trunk/examples/core/embedded/src/org/hornetq/core/example/EmbeddedExample.java
   trunk/examples/core/microcontainer/src/org/hornetq/core/example/EmbeddedMicroContainerExample.java
   trunk/examples/core/perf/src/org/hornetq/core/example/PerfBase.java
   trunk/examples/jms/applet/src/org/hornetq/jms/example/AppletExample.java
   trunk/examples/jms/embedded/src/org/hornetq/jms/example/EmbeddedExample.java
   trunk/examples/jms/instantiate-connection-factory/src/org/hornetq/jms/example/InstantiateConnectionFactoryExample.java
   trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java
   trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java
   trunk/src/main/org/hornetq/core/config/Configuration.java
   trunk/src/main/org/hornetq/core/journal/impl/AIOSequentialFileFactory.java
   trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFileFactory.java
   trunk/src/main/org/hornetq/core/management/ObjectNameBuilder.java
   trunk/src/main/org/hornetq/core/messagecounter/impl/MessageCounterManagerImpl.java
   trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
   trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
   trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
   trunk/src/main/org/hornetq/core/server/management/impl/ManagementServiceImpl.java
   trunk/src/main/org/hornetq/jms/client/HornetQConnection.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/server/config/impl/ConnectionFactoryConfigurationImpl.java
   trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.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/jms/server/recovery/HornetQXAResourceWrapper.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/service/HornetQFileConfigurationService.java
   trunk/src/main/org/hornetq/service/HornetQJMSStarterService.java
   trunk/src/main/org/hornetq/service/HornetQStarterService.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/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
   trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
   trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java
   trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java
   trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java
   trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java
   trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java
   trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientExitTest.java
   trunk/tests/src/org/hornetq/tests/integration/clientcrash/CrashClient.java
   trunk/tests/src/org/hornetq/tests/integration/clientcrash/GracefulClient.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
   trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java
   trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java
   trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
   trunk/tests/src/org/hornetq/tests/integration/http/NettyHttpTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/client/ReSendLargeMessageTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
   trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.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/config/JMSConfigurationTest.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/JMSServerControl2Test.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.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/integration/journal/AIOJournalCompactTest.java
   trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalImplTest.java
   trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
   trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java
   trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java
   trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/CoreMessagingProxy.java
   trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
   trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java
   trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java
   trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java
   trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java
   trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
   trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
   trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java
   trunk/tests/src/org/hornetq/tests/integration/security/SimpleClient.java
   trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
   trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
   trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
   trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java
   trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java
   trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java
   trunk/tests/src/org/hornetq/tests/opt/SendTest.java
   trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java
   trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
   trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
   trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
   trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java
   trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
   trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
   trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java
   trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
   trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java
   trunk/tests/src/org/hornetq/tests/util/ListJournal.java
   trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
Log:
HORNETQ-258: Public vs. Private API

* moved classes which belongs to the public API
  - clients are allowed to instantiate ClientSessionFactoryImpl, HornetQConnectionFactory, etc.
  - integrators are allowed to instantiate JMSServerManagerImpl, ConfigurationImpl, etc.
* moved ConnectionLoadBalancingPolicy and its children to package o.h.core.client.loadbalance

Modified: trunk/examples/core/embedded/src/org/hornetq/core/example/EmbeddedExample.java
===================================================================
--- trunk/examples/core/embedded/src/org/hornetq/core/example/EmbeddedExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/core/embedded/src/org/hornetq/core/example/EmbeddedExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,10 +20,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedRemoteExample.java
===================================================================
--- trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedRemoteExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedRemoteExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 

Modified: trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedServer.java
===================================================================
--- trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedServer.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/core/embedded-remote/src/org/hornetq/core/example/EmbeddedServer.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,8 +16,8 @@
 import java.util.HashSet;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;

Modified: trunk/examples/core/microcontainer/src/org/hornetq/core/example/EmbeddedMicroContainerExample.java
===================================================================
--- trunk/examples/core/microcontainer/src/org/hornetq/core/example/EmbeddedMicroContainerExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/core/microcontainer/src/org/hornetq/core/example/EmbeddedMicroContainerExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.integration.bootstrap.HornetQBootstrapServer;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;

Modified: trunk/examples/core/perf/src/org/hornetq/core/example/PerfBase.java
===================================================================
--- trunk/examples/core/perf/src/org/hornetq/core/example/PerfBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/core/perf/src/org/hornetq/core/example/PerfBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,9 +27,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
 import org.hornetq.core.client.SendAcknowledgementHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.message.Message;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;

Modified: trunk/examples/jms/applet/src/org/hornetq/jms/example/AppletExample.java
===================================================================
--- trunk/examples/jms/applet/src/org/hornetq/jms/example/AppletExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/jms/applet/src/org/hornetq/jms/example/AppletExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -43,11 +43,11 @@
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
 
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQTopic;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * A AppletExample

Modified: trunk/examples/jms/embedded/src/org/hornetq/jms/example/EmbeddedExample.java
===================================================================
--- trunk/examples/jms/embedded/src/org/hornetq/jms/example/EmbeddedExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/jms/embedded/src/org/hornetq/jms/example/EmbeddedExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,20 +26,20 @@
 import javax.naming.InitialContext;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.JMSConfiguration;
 import org.hornetq.jms.server.config.QueueConfiguration;
 import org.hornetq.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
 import org.hornetq.jms.server.config.impl.JMSConfigurationImpl;
 import org.hornetq.jms.server.config.impl.QueueConfigurationImpl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.jnp.server.Main;
 import org.jnp.server.NamingBeanImpl;
 

Modified: trunk/examples/jms/instantiate-connection-factory/src/org/hornetq/jms/example/InstantiateConnectionFactoryExample.java
===================================================================
--- trunk/examples/jms/instantiate-connection-factory/src/org/hornetq/jms/example/InstantiateConnectionFactoryExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/jms/instantiate-connection-factory/src/org/hornetq/jms/example/InstantiateConnectionFactoryExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,8 +27,8 @@
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.integration.transports.netty.TransportConstants;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * 

Modified: trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java
===================================================================
--- trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,9 +22,9 @@
 import javax.jms.Topic;
 
 import org.hornetq.common.example.HornetQExample;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
 import org.hornetq.jms.HornetQTopic;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 
 /**
  * This example demonstrates a cluster of three nodes set up in a symmetric topology - i.e. each node

Modified: trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,6 +16,7 @@
 import java.util.List;
 
 import org.hornetq.Pair;
+import org.hornetq.core.client.loadbalance.ConnectionLoadBalancingPolicy;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.Interceptor;
@@ -162,7 +163,7 @@
    /**
     * Returns the period used to check if a client has failed to receive pings from the server.
     *   
-    * Period is in milliseconds, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
+    * Period is in milliseconds, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
     * 
     * @return the period used to check if a client has failed to receive pings from the server
     */
@@ -182,7 +183,7 @@
     * 
     * There is 1 temporary file created for each large message.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}.
     * 
     * @return <code>true</code> if consumers created through this factory will cache large messages in temporary files, <code>false</code> else
     */
@@ -199,7 +200,7 @@
     * Returns the connection <em>time-to-live</em>.
     * This TTL determines how long the server will keep a connection alive in the absence of any data arriving from the client.
     * 
-    * Value is in milliseconds, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CONNECTION_TTL}.
+    * Value is in milliseconds, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CONNECTION_TTL}.
     * 
     * @return the connection time-to-live in milliseconds
     */
@@ -218,7 +219,7 @@
     * Returns the blocking calls timeout.
     * 
     * If client's blocking calls to the server take more than this timeout, the call will throw a {@link HornetQException} with the code {@link HornetQException#CONNECTION_TIMEDOUT}.
-    * Value is in milliseconds, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CALL_TIMEOUT}.
+    * Value is in milliseconds, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CALL_TIMEOUT}.
     * 
     * @return the blocking calls timeout
     */
@@ -238,7 +239,7 @@
     * 
     * Messages whose size is if greater than this value will be handled as <em>large messages</em>.
     * 
-    * Value is in bytes, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_MIN_LARGE_MESSAGE_SIZE}.
+    * Value is in bytes, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_MIN_LARGE_MESSAGE_SIZE}.
     * 
     * @return the message size threshold to treat messages as large messages.
     */
@@ -256,7 +257,7 @@
    /**
     * Returns the window size for flow control of the consumers created through this factory.
     * 
-    * Value is in bytes, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CONSUMER_WINDOW_SIZE}.
+    * Value is in bytes, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CONSUMER_WINDOW_SIZE}.
     * 
     * @return the window size used for consumer flow control
     */
@@ -277,7 +278,7 @@
     * This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified.
     * 
     * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CONSUMER_MAX_RATE}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CONSUMER_MAX_RATE}.
     * 
     * @return the consumer max rate
     */
@@ -295,7 +296,7 @@
    /**
     * Returns the size for the confirmation window of clients using this factory.
     * 
-    * Value is in bytes or -1 (to disable the window). Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CONFIRMATION_WINDOW_SIZE}.
+    * Value is in bytes or -1 (to disable the window). Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CONFIRMATION_WINDOW_SIZE}.
     * 
     * @return the size for the confirmation window of clients using this factory
     */
@@ -314,7 +315,7 @@
     * Returns the window size for flow control of the producers created through this factory.
     * 
     * Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection).
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_PRODUCER_WINDOW_SIZE}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_PRODUCER_WINDOW_SIZE}.
     * 
     * @return the window size for flow control of the producers created through this factory.
     */
@@ -335,7 +336,7 @@
     * This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified.
     * 
     * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_PRODUCER_MAX_RATE}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_PRODUCER_MAX_RATE}.
     * 
     * @return  maximum rate of message production (in messages per seconds)
     */
@@ -353,7 +354,7 @@
    /**
     * Returns whether consumers created through this factory will block while sending message acknowledgements or do it asynchronously.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
     * 
     * @return whether consumers will block while sending message acknowledgements or do it asynchronously
     */
@@ -372,7 +373,7 @@
     * If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
     * to be notified once the message has been handled by the server.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_DURABLE_SEND}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_DURABLE_SEND}.
     *
     * @return whether producers will block while sending persistent messages or do it asynchronously
     */
@@ -391,7 +392,7 @@
     * If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
     * to be notified once the message has been handled by the server.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}.
     *
     * @return whether producers will block while sending non-durable messages or do it asynchronously
     */
@@ -410,7 +411,7 @@
     * 
     * if <code>true</code>, a random unique group ID is created and set on each message for the property
     * {@link org.hornetq.core.message.impl.MessageImpl#HDR_GROUP_ID}.
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_AUTO_GROUP}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_AUTO_GROUP}.
     * 
     * @return whether producers will automatically assign a group ID to their messages
     */
@@ -443,7 +444,7 @@
    /**
     * Returns whether messages will pre-acknowledged on the server before they are sent to the consumers or not.
     *
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_PRE_ACKNOWLEDGE}
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_PRE_ACKNOWLEDGE}
     */
    boolean isPreAcknowledge();
 
@@ -458,7 +459,7 @@
    /**
     * Returns the acknowledgements batch size.
     * 
-    * Default value is  {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_ACK_BATCH_SIZE}.
+    * Default value is  {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_ACK_BATCH_SIZE}.
     * 
     * @return the acknowledgements batch size
     */
@@ -510,7 +511,7 @@
     * If this factory uses discovery to find HornetQ servers, the list of discovered servers
     * will be refreshed according to this timeout.
     * 
-    * Value is in milliseconds, default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_DISCOVERY_REFRESH_TIMEOUT}.
+    * Value is in milliseconds, default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_DISCOVERY_REFRESH_TIMEOUT}.
     * 
     * @return the refresh timeout for discovered HornetQ servers
     */
@@ -528,7 +529,7 @@
    /**
     * Returns the initial wait timeout if this factory is configured to use discovery.
     * 
-    * Value is in milliseconds, default value is  {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT}. 
+    * Value is in milliseconds, default value is  {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT}. 
     * 
     * @return the initial wait timeout if this factory is configured to use discovery 
     */
@@ -547,7 +548,7 @@
     * Returns whether this factory will use global thread pools (shared among all the factories in the same JVM)
     * or its own pools.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_USE_GLOBAL_POOLS}. 
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_USE_GLOBAL_POOLS}. 
     * 
     * @return <code>true</code> if this factory uses global thread pools, <code>false</code> else
     */
@@ -564,7 +565,7 @@
    /**
     * Returns the maximum size of the scheduled thread pool.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. 
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. 
     * 
     * @return the maximum size of the scheduled thread pool.
     */
@@ -583,7 +584,7 @@
    /**
     * Returns the maximum size of the thread pool.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_THREAD_POOL_MAX_SIZE}. 
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_THREAD_POOL_MAX_SIZE}. 
     * 
     * @return the maximum size of the thread pool.
     */
@@ -602,7 +603,7 @@
    /**
     * Returns the time to retry connections created by this factory after failure. 
     * 
-    * Value is in milliseconds, default is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_RETRY_INTERVAL}.
+    * Value is in milliseconds, default is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_RETRY_INTERVAL}.
     * 
     * @return the time to retry connections created by this factory after failure
     */
@@ -620,7 +621,7 @@
    /**
     * Returns the multiplier to apply to successive retry intervals.
     * 
-    * Default value is  {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_RETRY_INTERVAL_MULTIPLIER}.
+    * Default value is  {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_RETRY_INTERVAL_MULTIPLIER}.
     * 
     * @return the multiplier to apply to successive retry intervals
     */
@@ -638,7 +639,7 @@
    /**
     * Returns the maximum retry interval (in the case a retry interval multiplier has been specified).
     * 
-    * Value is in milliseconds, default value is  {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_MAX_RETRY_INTERVAL}.
+    * Value is in milliseconds, default value is  {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_MAX_RETRY_INTERVAL}.
     * 
     * @return the maximum retry interval
     */
@@ -656,7 +657,7 @@
    /**
     * Returns the maximum number of attempts to retry connection in case of failure.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_RECONNECT_ATTEMPTS}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_RECONNECT_ATTEMPTS}.
     * 
     * @return the maximum number of attempts to retry connection in case of failure.
     */
@@ -675,7 +676,7 @@
     * Returns whether connections created by this factory must failover in case the server they are
     * connected to <em>has normally shut down</em>.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN}.
     * 
     * @return <code>true</code> if connections must failover if the server has normally shut down, else <code>false</code>
     */
@@ -692,7 +693,7 @@
    /**
     * Returns the class name of the connection load balancing policy.
     * 
-    * Default value is {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME}.
+    * Default value is {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME}.
     * 
     * @return the class name of the connection load balancing policy
     */
@@ -710,7 +711,7 @@
    /**
     * Returns the initial size of messages created through this factory.
     * 
-    * Value is in bytes, default value is  {@value org.hornetq.core.client.impl.ClientSessionFactoryImpl#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}.
+    * Value is in bytes, default value is  {@value org.hornetq.core.client.ClientSessionFactoryImpl#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}.
     * 
     * @return the initial size of messages created through this factory
     */

Copied: trunk/src/main/org/hornetq/core/client/ClientSessionFactoryImpl.java (from rev 8697, trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java)
===================================================================
--- trunk/src/main/org/hornetq/core/client/ClientSessionFactoryImpl.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/client/ClientSessionFactoryImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,1175 @@
+/*
+ * 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.core.client;
+
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+import org.hornetq.Pair;
+import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
+import org.hornetq.core.client.impl.FailoverManager;
+import org.hornetq.core.client.impl.FailoverManagerImpl;
+import org.hornetq.core.client.loadbalance.ConnectionLoadBalancingPolicy;
+import org.hornetq.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy;
+import org.hornetq.core.cluster.DiscoveryEntry;
+import org.hornetq.core.cluster.DiscoveryGroup;
+import org.hornetq.core.cluster.DiscoveryListener;
+import org.hornetq.core.cluster.impl.DiscoveryGroupImpl;
+import org.hornetq.core.config.TransportConfiguration;
+import org.hornetq.core.exception.HornetQException;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.remoting.Interceptor;
+import org.hornetq.utils.HornetQThreadFactory;
+import org.hornetq.utils.UUIDGenerator;
+
+/**
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
+ * @author <a href="mailto:ataylor at redhat.com">Andy Taylor</a>
+ * @version <tt>$Revision: 3602 $</tt>
+ * 
+ */
+public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, DiscoveryListener, Serializable
+{
+   // Constants
+   // ------------------------------------------------------------------------------------
+
+   private static final long serialVersionUID = 2512460695662741413L;
+
+   private static final Logger log = Logger.getLogger(ClientSessionFactoryImpl.class);
+
+   public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName();
+   
+   public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = 30000;
+
+   // 1 minute - this should be higher than ping period
+   public static final long DEFAULT_CONNECTION_TTL = 1 * 60 * 1000;
+
+   // Any message beyond this size is considered a large message (to be sent in chunks)
+   public static final int DEFAULT_MIN_LARGE_MESSAGE_SIZE = 100 * 1024;
+
+   public static final int DEFAULT_CONSUMER_WINDOW_SIZE = 1024 * 1024;
+
+   public static final int DEFAULT_CONSUMER_MAX_RATE = -1;
+
+   public static final int DEFAULT_CONFIRMATION_WINDOW_SIZE = -1;
+
+   public static final int DEFAULT_PRODUCER_WINDOW_SIZE = 1024 * 1024;
+
+   public static final int DEFAULT_PRODUCER_MAX_RATE = -1;
+
+   public static final boolean DEFAULT_BLOCK_ON_ACKNOWLEDGE = false;
+
+   public static final boolean DEFAULT_BLOCK_ON_DURABLE_SEND = true;
+
+   public static final boolean DEFAULT_BLOCK_ON_NON_DURABLE_SEND = false;
+
+   public static final boolean DEFAULT_AUTO_GROUP = false;
+
+   public static final long DEFAULT_CALL_TIMEOUT = 30000;
+
+   public static final int DEFAULT_ACK_BATCH_SIZE = 1024 * 1024;
+
+   public static final boolean DEFAULT_PRE_ACKNOWLEDGE = false;
+
+   public static final long DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT = 2000;
+
+   public static final long DEFAULT_DISCOVERY_REFRESH_TIMEOUT = 10000;
+
+   public static final long DEFAULT_RETRY_INTERVAL = 2000;
+
+   public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER = 1d;
+
+   public static final long DEFAULT_MAX_RETRY_INTERVAL = 2000;
+
+   public static final int DEFAULT_RECONNECT_ATTEMPTS = 0;
+
+   public static final boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN = false;
+
+   public static final boolean DEFAULT_USE_GLOBAL_POOLS = true;
+
+   public static final int DEFAULT_THREAD_POOL_MAX_SIZE = -1;
+
+   public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 5;
+
+   public static final boolean DEFAULT_CACHE_LARGE_MESSAGE_CLIENT = false;
+
+   public static final int DEFAULT_INITIAL_MESSAGE_PACKET_SIZE = 1500;
+
+   // Attributes
+   // -----------------------------------------------------------------------------------
+
+   private final Map<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager> failoverManagerMap = new LinkedHashMap<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager>();
+
+   private volatile boolean receivedBroadcast = false;
+
+   private ExecutorService threadPool;
+
+   private ScheduledExecutorService scheduledThreadPool;
+
+   private DiscoveryGroup discoveryGroup;
+
+   private ConnectionLoadBalancingPolicy loadBalancingPolicy;
+
+   private FailoverManager[] failoverManagerArray;
+
+   private boolean readOnly;
+
+   // Settable attributes:
+
+   private boolean cacheLargeMessagesClient = ClientSessionFactoryImpl.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
+
+   private List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors;
+
+   private String discoveryAddress;
+
+   private int discoveryPort;
+
+   private long discoveryRefreshTimeout;
+
+   private long discoveryInitialWaitTimeout;
+
+   private long clientFailureCheckPeriod;
+
+   private long connectionTTL;
+
+   private long callTimeout;
+
+   private int minLargeMessageSize;
+
+   private int consumerWindowSize;
+
+   private int consumerMaxRate;
+
+   private int confirmationWindowSize;
+
+   private int producerWindowSize;
+
+   private int producerMaxRate;
+
+   private boolean blockOnAcknowledge;
+
+   private boolean blockOnDurableSend;
+
+   private boolean blockOnNonDurableSend;
+
+   private boolean autoGroup;
+
+   private boolean preAcknowledge;
+
+   private String connectionLoadBalancingPolicyClassName;
+
+   private int ackBatchSize;
+
+   private boolean useGlobalPools;
+
+   private int scheduledThreadPoolMaxSize;
+
+   private int threadPoolMaxSize;
+
+   private long retryInterval;
+
+   private double retryIntervalMultiplier;
+
+   private long maxRetryInterval;
+
+   private int reconnectAttempts;
+
+   private int initialMessagePacketSize;
+
+   private volatile boolean closed;
+
+   private boolean failoverOnServerShutdown;
+
+   private final List<Interceptor> interceptors = new CopyOnWriteArrayList<Interceptor>();
+
+   private static ExecutorService globalThreadPool;
+
+   private static ScheduledExecutorService globalScheduledThreadPool;
+
+   private String groupID;
+
+   private static synchronized ExecutorService getGlobalThreadPool()
+   {
+      if (ClientSessionFactoryImpl.globalThreadPool == null)
+      {
+         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-threads", true);
+
+         ClientSessionFactoryImpl.globalThreadPool = Executors.newCachedThreadPool(factory);
+      }
+
+      return ClientSessionFactoryImpl.globalThreadPool;
+   }
+
+   private static synchronized ScheduledExecutorService getGlobalScheduledThreadPool()
+   {
+      if (ClientSessionFactoryImpl.globalScheduledThreadPool == null)
+      {
+         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-scheduled-threads", true);
+
+         ClientSessionFactoryImpl.globalScheduledThreadPool = Executors.newScheduledThreadPool(ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
+                                                                                               factory);
+      }
+
+      return ClientSessionFactoryImpl.globalScheduledThreadPool;
+   }
+
+   private void setThreadPools()
+   {
+      if (useGlobalPools)
+      {
+         threadPool = ClientSessionFactoryImpl.getGlobalThreadPool();
+
+         scheduledThreadPool = ClientSessionFactoryImpl.getGlobalScheduledThreadPool();
+      }
+      else
+      {
+         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-factory-threads-" + System.identityHashCode(this),
+                                                          true);
+
+         if (threadPoolMaxSize == -1)
+         {
+            threadPool = Executors.newCachedThreadPool(factory);
+         }
+         else
+         {
+            threadPool = Executors.newFixedThreadPool(threadPoolMaxSize, factory);
+         }
+
+         factory = new HornetQThreadFactory("HornetQ-client-factory-pinger-threads-" + System.identityHashCode(this),
+                                            true);
+
+         scheduledThreadPool = Executors.newScheduledThreadPool(scheduledThreadPoolMaxSize, factory);
+      }
+   }
+
+   private synchronized void initialise() throws Exception
+   {
+      if (!readOnly)
+      {
+         setThreadPools();
+
+         instantiateLoadBalancingPolicy();
+
+         if (discoveryAddress != null)
+         {
+            InetAddress groupAddress = InetAddress.getByName(discoveryAddress);
+
+            discoveryGroup = new DiscoveryGroupImpl(UUIDGenerator.getInstance().generateStringUUID(),
+                                                    discoveryAddress,
+                                                    groupAddress,
+                                                    discoveryPort,
+                                                    discoveryRefreshTimeout);
+
+            discoveryGroup.registerListener(this);
+
+            discoveryGroup.start();
+         }
+         else if (staticConnectors != null)
+         {
+            for (Pair<TransportConfiguration, TransportConfiguration> pair : staticConnectors)
+            {
+               FailoverManager cm = new FailoverManagerImpl(this,
+                                                            pair.a,
+                                                            pair.b,
+                                                            failoverOnServerShutdown,
+                                                            callTimeout,
+                                                            clientFailureCheckPeriod,
+                                                            connectionTTL,
+                                                            retryInterval,
+                                                            retryIntervalMultiplier,
+                                                            maxRetryInterval,
+                                                            reconnectAttempts,
+                                                            threadPool,
+                                                            scheduledThreadPool,
+                                                            interceptors);
+
+               failoverManagerMap.put(pair, cm);
+            }
+
+            updatefailoverManagerArray();
+         }
+         else
+         {
+            throw new IllegalStateException("Before using a session factory you must either set discovery address and port or " + "provide some static transport configuration");
+         }
+         readOnly = true;
+      }
+   }
+
+   // Static
+   // ---------------------------------------------------------------------------------------
+
+   // Constructors
+   // ---------------------------------------------------------------------------------
+
+   public ClientSessionFactoryImpl(final ClientSessionFactory other)
+   {
+      discoveryAddress = other.getDiscoveryAddress();
+
+      discoveryPort = other.getDiscoveryPort();
+
+      staticConnectors = other.getStaticConnectors();
+
+      discoveryRefreshTimeout = other.getDiscoveryRefreshTimeout();
+
+      clientFailureCheckPeriod = other.getClientFailureCheckPeriod();
+
+      connectionTTL = other.getConnectionTTL();
+
+      callTimeout = other.getCallTimeout();
+
+      minLargeMessageSize = other.getMinLargeMessageSize();
+
+      consumerWindowSize = other.getConsumerWindowSize();
+
+      consumerMaxRate = other.getConsumerMaxRate();
+
+      confirmationWindowSize = other.getConfirmationWindowSize();
+
+      producerWindowSize = other.getProducerWindowSize();
+
+      producerMaxRate = other.getProducerMaxRate();
+
+      blockOnAcknowledge = other.isBlockOnAcknowledge();
+
+      blockOnDurableSend = other.isBlockOnDurableSend();
+
+      blockOnNonDurableSend = other.isBlockOnNonDurableSend();
+
+      autoGroup = other.isAutoGroup();
+
+      preAcknowledge = other.isPreAcknowledge();
+
+      ackBatchSize = other.getAckBatchSize();
+
+      connectionLoadBalancingPolicyClassName = other.getConnectionLoadBalancingPolicyClassName();
+
+      discoveryInitialWaitTimeout = other.getDiscoveryInitialWaitTimeout();
+
+      useGlobalPools = other.isUseGlobalPools();
+
+      scheduledThreadPoolMaxSize = other.getScheduledThreadPoolMaxSize();
+
+      threadPoolMaxSize = other.getThreadPoolMaxSize();
+
+      retryInterval = other.getRetryInterval();
+
+      retryIntervalMultiplier = other.getRetryIntervalMultiplier();
+
+      maxRetryInterval = other.getMaxRetryInterval();
+
+      reconnectAttempts = other.getReconnectAttempts();
+
+      failoverOnServerShutdown = other.isFailoverOnServerShutdown();
+
+      cacheLargeMessagesClient = other.isCacheLargeMessagesClient();
+
+      initialMessagePacketSize = other.getInitialMessagePacketSize();
+
+      groupID = other.getGroupID();
+   }
+
+   public ClientSessionFactoryImpl()
+   {
+      discoveryRefreshTimeout = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_REFRESH_TIMEOUT;
+
+      clientFailureCheckPeriod = ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD;
+
+      connectionTTL = ClientSessionFactoryImpl.DEFAULT_CONNECTION_TTL;
+
+      callTimeout = ClientSessionFactoryImpl.DEFAULT_CALL_TIMEOUT;
+
+      minLargeMessageSize = ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
+
+      consumerWindowSize = ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
+
+      consumerMaxRate = ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
+
+      confirmationWindowSize = ClientSessionFactoryImpl.DEFAULT_CONFIRMATION_WINDOW_SIZE;
+
+      producerWindowSize = ClientSessionFactoryImpl.DEFAULT_PRODUCER_WINDOW_SIZE;
+
+      producerMaxRate = ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
+
+      blockOnAcknowledge = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE;
+
+      blockOnDurableSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_DURABLE_SEND;
+
+      blockOnNonDurableSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_DURABLE_SEND;
+
+      autoGroup = ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP;
+
+      preAcknowledge = ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
+
+      ackBatchSize = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
+
+      connectionLoadBalancingPolicyClassName = ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
+
+      discoveryInitialWaitTimeout = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
+
+      useGlobalPools = ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS;
+
+      scheduledThreadPoolMaxSize = ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
+
+      threadPoolMaxSize = ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE;
+
+      retryInterval = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL;
+
+      retryIntervalMultiplier = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER;
+
+      maxRetryInterval = ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
+
+      reconnectAttempts = ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS;
+
+      failoverOnServerShutdown = ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
+
+      cacheLargeMessagesClient = ClientSessionFactoryImpl.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
+
+      initialMessagePacketSize = ClientSessionFactoryImpl.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
+   }
+
+   public ClientSessionFactoryImpl(final String discoveryAddress, final int discoveryPort)
+   {
+      this();
+
+      this.discoveryAddress = discoveryAddress;
+
+      this.discoveryPort = discoveryPort;
+   }
+
+   public ClientSessionFactoryImpl(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
+   {
+      this();
+
+      this.staticConnectors = staticConnectors;
+   }
+
+   public ClientSessionFactoryImpl(final TransportConfiguration connectorConfig,
+                                   final TransportConfiguration backupConnectorConfig)
+   {
+      this();
+
+      staticConnectors = new ArrayList<Pair<TransportConfiguration, TransportConfiguration>>();
+
+      staticConnectors.add(new Pair<TransportConfiguration, TransportConfiguration>(connectorConfig,
+                                                                                    backupConnectorConfig));
+   }
+
+   public ClientSessionFactoryImpl(final TransportConfiguration connectorConfig)
+   {
+      this(connectorConfig, null);
+   }
+
+   // ClientSessionFactory implementation------------------------------------------------------------
+
+   public synchronized boolean isCacheLargeMessagesClient()
+   {
+      return cacheLargeMessagesClient;
+   }
+
+   public synchronized void setCacheLargeMessagesClient(final boolean cached)
+   {
+      cacheLargeMessagesClient = cached;
+   }
+
+   public synchronized List<Pair<TransportConfiguration, TransportConfiguration>> getStaticConnectors()
+   {
+      return staticConnectors;
+   }
+
+   public synchronized void setStaticConnectors(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
+   {
+      checkWrite();
+
+      this.staticConnectors = staticConnectors;
+   }
+
+   public synchronized long getClientFailureCheckPeriod()
+   {
+      return clientFailureCheckPeriod;
+   }
+
+   public synchronized void setClientFailureCheckPeriod(final long clientFailureCheckPeriod)
+   {
+      checkWrite();
+      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
+   }
+
+   public synchronized long getConnectionTTL()
+   {
+      return connectionTTL;
+   }
+
+   public synchronized void setConnectionTTL(final long connectionTTL)
+   {
+      checkWrite();
+      this.connectionTTL = connectionTTL;
+   }
+
+   public synchronized long getCallTimeout()
+   {
+      return callTimeout;
+   }
+
+   public synchronized void setCallTimeout(final long callTimeout)
+   {
+      checkWrite();
+      this.callTimeout = callTimeout;
+   }
+
+   public synchronized int getMinLargeMessageSize()
+   {
+      return minLargeMessageSize;
+   }
+
+   public synchronized void setMinLargeMessageSize(final int minLargeMessageSize)
+   {
+      checkWrite();
+      this.minLargeMessageSize = minLargeMessageSize;
+   }
+
+   public synchronized int getConsumerWindowSize()
+   {
+      return consumerWindowSize;
+   }
+
+   public synchronized void setConsumerWindowSize(final int consumerWindowSize)
+   {
+      checkWrite();
+      this.consumerWindowSize = consumerWindowSize;
+   }
+
+   public synchronized int getConsumerMaxRate()
+   {
+      return consumerMaxRate;
+   }
+
+   public synchronized void setConsumerMaxRate(final int consumerMaxRate)
+   {
+      checkWrite();
+      this.consumerMaxRate = consumerMaxRate;
+   }
+
+   public synchronized int getConfirmationWindowSize()
+   {
+      return confirmationWindowSize;
+   }
+
+   public synchronized void setConfirmationWindowSize(final int confirmationWindowSize)
+   {
+      checkWrite();
+      this.confirmationWindowSize = confirmationWindowSize;
+   }
+
+   public synchronized int getProducerWindowSize()
+   {
+      return producerWindowSize;
+   }
+
+   public synchronized void setProducerWindowSize(final int producerWindowSize)
+   {
+      checkWrite();
+      this.producerWindowSize = producerWindowSize;
+   }
+
+   public synchronized int getProducerMaxRate()
+   {
+      return producerMaxRate;
+   }
+
+   public synchronized void setProducerMaxRate(final int producerMaxRate)
+   {
+      checkWrite();
+      this.producerMaxRate = producerMaxRate;
+   }
+
+   public synchronized boolean isBlockOnAcknowledge()
+   {
+      return blockOnAcknowledge;
+   }
+
+   public synchronized void setBlockOnAcknowledge(final boolean blockOnAcknowledge)
+   {
+      checkWrite();
+      this.blockOnAcknowledge = blockOnAcknowledge;
+   }
+
+   public synchronized boolean isBlockOnDurableSend()
+   {
+      return blockOnDurableSend;
+   }
+
+   public synchronized void setBlockOnDurableSend(final boolean blockOnDurableSend)
+   {
+      checkWrite();
+      this.blockOnDurableSend = blockOnDurableSend;
+   }
+
+   public synchronized boolean isBlockOnNonDurableSend()
+   {
+      return blockOnNonDurableSend;
+   }
+
+   public synchronized void setBlockOnNonDurableSend(final boolean blockOnNonDurableSend)
+   {
+      checkWrite();
+      this.blockOnNonDurableSend = blockOnNonDurableSend;
+   }
+
+   public synchronized boolean isAutoGroup()
+   {
+      return autoGroup;
+   }
+
+   public synchronized void setAutoGroup(final boolean autoGroup)
+   {
+      checkWrite();
+      this.autoGroup = autoGroup;
+   }
+
+   public synchronized boolean isPreAcknowledge()
+   {
+      return preAcknowledge;
+   }
+
+   public synchronized void setPreAcknowledge(final boolean preAcknowledge)
+   {
+      checkWrite();
+      this.preAcknowledge = preAcknowledge;
+   }
+
+   public synchronized int getAckBatchSize()
+   {
+      return ackBatchSize;
+   }
+
+   public synchronized void setAckBatchSize(final int ackBatchSize)
+   {
+      checkWrite();
+      this.ackBatchSize = ackBatchSize;
+   }
+
+   public synchronized long getDiscoveryInitialWaitTimeout()
+   {
+      return discoveryInitialWaitTimeout;
+   }
+
+   public synchronized void setDiscoveryInitialWaitTimeout(final long initialWaitTimeout)
+   {
+      checkWrite();
+      discoveryInitialWaitTimeout = initialWaitTimeout;
+   }
+
+   public synchronized boolean isUseGlobalPools()
+   {
+      return useGlobalPools;
+   }
+
+   public synchronized void setUseGlobalPools(final boolean useGlobalPools)
+   {
+      checkWrite();
+      this.useGlobalPools = useGlobalPools;
+   }
+
+   public synchronized int getScheduledThreadPoolMaxSize()
+   {
+      return scheduledThreadPoolMaxSize;
+   }
+
+   public synchronized void setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize)
+   {
+      checkWrite();
+      this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize;
+   }
+
+   public synchronized int getThreadPoolMaxSize()
+   {
+      return threadPoolMaxSize;
+   }
+
+   public synchronized void setThreadPoolMaxSize(final int threadPoolMaxSize)
+   {
+      checkWrite();
+      this.threadPoolMaxSize = threadPoolMaxSize;
+   }
+
+   public synchronized long getRetryInterval()
+   {
+      return retryInterval;
+   }
+
+   public synchronized void setRetryInterval(final long retryInterval)
+   {
+      checkWrite();
+      this.retryInterval = retryInterval;
+   }
+
+   public synchronized long getMaxRetryInterval()
+   {
+      return maxRetryInterval;
+   }
+
+   public synchronized void setMaxRetryInterval(final long retryInterval)
+   {
+      checkWrite();
+      maxRetryInterval = retryInterval;
+   }
+
+   public synchronized double getRetryIntervalMultiplier()
+   {
+      return retryIntervalMultiplier;
+   }
+
+   public synchronized void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
+   {
+      checkWrite();
+      this.retryIntervalMultiplier = retryIntervalMultiplier;
+   }
+
+   public synchronized int getReconnectAttempts()
+   {
+      return reconnectAttempts;
+   }
+
+   public synchronized void setReconnectAttempts(final int reconnectAttempts)
+   {
+      checkWrite();
+      this.reconnectAttempts = reconnectAttempts;
+   }
+
+   public synchronized boolean isFailoverOnServerShutdown()
+   {
+      return failoverOnServerShutdown;
+   }
+
+   public synchronized void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
+   {
+      checkWrite();
+      this.failoverOnServerShutdown = failoverOnServerShutdown;
+   }
+
+   public synchronized String getConnectionLoadBalancingPolicyClassName()
+   {
+      return connectionLoadBalancingPolicyClassName;
+   }
+
+   public synchronized void setConnectionLoadBalancingPolicyClassName(final String loadBalancingPolicyClassName)
+   {
+      checkWrite();
+      connectionLoadBalancingPolicyClassName = loadBalancingPolicyClassName;
+   }
+
+   public synchronized String getDiscoveryAddress()
+   {
+      return discoveryAddress;
+   }
+
+   public synchronized void setDiscoveryAddress(final String discoveryAddress)
+   {
+      checkWrite();
+      this.discoveryAddress = discoveryAddress;
+   }
+
+   public synchronized int getDiscoveryPort()
+   {
+      return discoveryPort;
+   }
+
+   public synchronized void setDiscoveryPort(final int discoveryPort)
+   {
+      checkWrite();
+      this.discoveryPort = discoveryPort;
+   }
+
+   public synchronized long getDiscoveryRefreshTimeout()
+   {
+      return discoveryRefreshTimeout;
+   }
+
+   public void addInterceptor(final Interceptor interceptor)
+   {
+      interceptors.add(interceptor);
+   }
+
+   public boolean removeInterceptor(final Interceptor interceptor)
+   {
+      return interceptors.remove(interceptor);
+   }
+
+   public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
+   {
+      checkWrite();
+      this.discoveryRefreshTimeout = discoveryRefreshTimeout;
+   }
+
+   public synchronized int getInitialMessagePacketSize()
+   {
+      return initialMessagePacketSize;
+   }
+
+   public synchronized void setInitialMessagePacketSize(final int size)
+   {
+      checkWrite();
+      initialMessagePacketSize = size;
+   }
+
+   public ClientSession createSession(final String username,
+                                      final String password,
+                                      final boolean xa,
+                                      final boolean autoCommitSends,
+                                      final boolean autoCommitAcks,
+                                      final boolean preAcknowledge,
+                                      final int ackBatchSize) throws HornetQException
+   {
+      return createSessionInternal(username,
+                                   password,
+                                   xa,
+                                   autoCommitSends,
+                                   autoCommitAcks,
+                                   preAcknowledge,
+                                   ackBatchSize);
+   }
+
+   public ClientSession createSession(final boolean autoCommitSends,
+                                      final boolean autoCommitAcks,
+                                      final int ackBatchSize) throws HornetQException
+   {
+      return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createXASession() throws HornetQException
+   {
+      return createSessionInternal(null, null, true, false, false, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createTransactedSession() throws HornetQException
+   {
+      return createSessionInternal(null, null, false, false, false, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createSession() throws HornetQException
+   {
+      return createSessionInternal(null, null, false, true, true, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException
+   {
+      return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException
+   {
+      return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
+   }
+
+   public ClientSession createSession(final boolean xa,
+                                      final boolean autoCommitSends,
+                                      final boolean autoCommitAcks,
+                                      final boolean preAcknowledge) throws HornetQException
+   {
+      return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
+   }
+
+   public int numSessions()
+   {
+      int num = 0;
+
+      for (FailoverManager failoverManager : failoverManagerMap.values())
+      {
+         num += failoverManager.numSessions();
+      }
+
+      return num;
+   }
+
+   public int numConnections()
+   {
+      int num = 0;
+
+      for (FailoverManager failoverManager : failoverManagerMap.values())
+      {
+         num += failoverManager.numConnections();
+      }
+
+      return num;
+   }
+
+   public void close()
+   {
+      if (closed)
+      {
+         return;
+      }
+
+      if (discoveryGroup != null)
+      {
+         try
+         {
+            discoveryGroup.stop();
+         }
+         catch (Exception e)
+         {
+            ClientSessionFactoryImpl.log.error("Failed to stop discovery group", e);
+         }
+      }
+
+      for (FailoverManager failoverManager : failoverManagerMap.values())
+      {
+         failoverManager.causeExit();
+      }
+
+      failoverManagerMap.clear();
+
+      if (!useGlobalPools)
+      {
+         if (threadPool != null)
+         {
+            threadPool.shutdown();
+
+            try
+            {
+               if (!threadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
+               {
+                  ClientSessionFactoryImpl.log.warn("Timed out waiting for pool to terminate");
+               }
+            }
+            catch (InterruptedException ignore)
+            {
+            }
+         }
+
+         if (scheduledThreadPool != null)
+         {
+            scheduledThreadPool.shutdown();
+
+            try
+            {
+               if (!scheduledThreadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
+               {
+                  ClientSessionFactoryImpl.log.warn("Timed out waiting for scheduled pool to terminate");
+               }
+            }
+            catch (InterruptedException ignore)
+            {
+            }
+         }
+      }
+
+      closed = true;
+   }
+
+   public ClientSessionFactory copy()
+   {
+      return new ClientSessionFactoryImpl(this);
+   }
+
+   public void setGroupID(final String groupID)
+   {
+      this.groupID = groupID;
+   }
+
+   public String getGroupID()
+   {
+      return groupID;
+   }
+
+   // DiscoveryListener implementation --------------------------------------------------------
+
+   public synchronized void connectorsChanged()
+   {
+      receivedBroadcast = true;
+
+      Map<String, DiscoveryEntry> newConnectors = discoveryGroup.getDiscoveryEntryMap();
+
+      Set<Pair<TransportConfiguration, TransportConfiguration>> connectorSet = new HashSet<Pair<TransportConfiguration, TransportConfiguration>>();
+
+      for (DiscoveryEntry entry : newConnectors.values())
+      {
+         connectorSet.add(entry.getConnectorPair());
+      }
+
+      Iterator<Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager>> iter = failoverManagerMap.entrySet()
+                                                                                                                          .iterator();
+      while (iter.hasNext())
+      {
+         Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager> entry = iter.next();
+
+         if (!connectorSet.contains(entry.getKey()))
+         {
+            // failoverManager no longer there - we should remove it
+
+            iter.remove();
+         }
+      }
+
+      for (Pair<TransportConfiguration, TransportConfiguration> connectorPair : connectorSet)
+      {
+         if (!failoverManagerMap.containsKey(connectorPair))
+         {
+            // Create a new failoverManager
+
+            FailoverManager failoverManager = new FailoverManagerImpl(this,
+                                                                      connectorPair.a,
+                                                                      connectorPair.b,
+                                                                      failoverOnServerShutdown,
+                                                                      callTimeout,
+                                                                      clientFailureCheckPeriod,
+                                                                      connectionTTL,
+                                                                      retryInterval,
+                                                                      retryIntervalMultiplier,
+                                                                      maxRetryInterval,
+                                                                      reconnectAttempts,
+                                                                      threadPool,
+                                                                      scheduledThreadPool,
+                                                                      interceptors);
+
+            failoverManagerMap.put(connectorPair, failoverManager);
+         }
+      }
+
+      updatefailoverManagerArray();
+   }
+
+   public FailoverManager[] getFailoverManagers()
+   {
+      return failoverManagerArray;
+   }
+
+   // Protected ------------------------------------------------------------------------------
+
+   @Override
+   protected void finalize() throws Throwable
+   {
+      close();
+
+      super.finalize();
+   }
+
+   // Private --------------------------------------------------------------------------------
+
+   private void checkWrite()
+   {
+      if (readOnly)
+      {
+         throw new IllegalStateException("Cannot set attribute on SessionFactory after it has been used");
+      }
+   }
+
+   private ClientSession createSessionInternal(final String username,
+                                               final String password,
+                                               final boolean xa,
+                                               final boolean autoCommitSends,
+                                               final boolean autoCommitAcks,
+                                               final boolean preAcknowledge,
+                                               final int ackBatchSize) throws HornetQException
+   {
+      if (closed)
+      {
+         throw new IllegalStateException("Cannot create session, factory is closed (maybe it has been garbage collected)");
+      }
+
+      try
+      {
+         initialise();
+      }
+      catch (Exception e)
+      {
+         throw new HornetQException(HornetQException.INTERNAL_ERROR, "Failed to initialise session factory", e);
+      }
+
+      if (discoveryGroup != null && !receivedBroadcast)
+      {
+         boolean ok = discoveryGroup.waitForBroadcast(discoveryInitialWaitTimeout);
+
+         if (!ok)
+         {
+            throw new HornetQException(HornetQException.CONNECTION_TIMEDOUT,
+                                       "Timed out waiting to receive initial broadcast from discovery group");
+         }
+      }
+
+      synchronized (this)
+      {
+         int pos = loadBalancingPolicy.select(failoverManagerArray.length);
+
+         FailoverManager failoverManager = failoverManagerArray[pos];
+
+         ClientSession session = failoverManager.createSession(username,
+                                                               password,
+                                                               xa,
+                                                               autoCommitSends,
+                                                               autoCommitAcks,
+                                                               preAcknowledge,
+                                                               ackBatchSize,
+                                                               cacheLargeMessagesClient,
+                                                               minLargeMessageSize,
+                                                               blockOnAcknowledge,
+                                                               autoGroup,
+                                                               confirmationWindowSize,
+                                                               producerWindowSize,
+                                                               consumerWindowSize,
+                                                               producerMaxRate,
+                                                               consumerMaxRate,
+                                                               blockOnNonDurableSend,
+                                                               blockOnDurableSend,
+                                                               initialMessagePacketSize,
+                                                               groupID);
+
+         return session;
+      }
+   }
+
+   private void instantiateLoadBalancingPolicy()
+   {
+      if (connectionLoadBalancingPolicyClassName == null)
+      {
+         throw new IllegalStateException("Please specify a load balancing policy class name on the session factory");
+      }
+
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         Class<?> clazz = loader.loadClass(connectionLoadBalancingPolicyClassName);
+         loadBalancingPolicy = (ConnectionLoadBalancingPolicy)clazz.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + connectionLoadBalancingPolicyClassName +
+                                                     "\"",
+                                            e);
+      }
+   }
+
+   private synchronized void updatefailoverManagerArray()
+   {
+      failoverManagerArray = new FailoverManager[failoverManagerMap.size()];
+
+      failoverManagerMap.values().toArray(failoverManagerArray);
+   }
+
+}

Deleted: trunk/src/main/org/hornetq/core/client/ConnectionLoadBalancingPolicy.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/ConnectionLoadBalancingPolicy.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/ConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,29 +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.core.client;
-
-/**
- * A ConnectionLoadBalancingPolicy defines a policy to load balance between connections.
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- */
-public interface ConnectionLoadBalancingPolicy
-{
-   /**
-    * Returns the selected index according to the policy implementation.
-    *
-    * @param max maximum position index that can be selected
-    */
-   int select(int max);
-}

Deleted: trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,1173 +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.core.client.impl;
-
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-
-import org.hornetq.Pair;
-import org.hornetq.core.client.ClientSession;
-import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.ConnectionLoadBalancingPolicy;
-import org.hornetq.core.cluster.DiscoveryEntry;
-import org.hornetq.core.cluster.DiscoveryGroup;
-import org.hornetq.core.cluster.DiscoveryListener;
-import org.hornetq.core.cluster.impl.DiscoveryGroupImpl;
-import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.exception.HornetQException;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.core.remoting.Interceptor;
-import org.hornetq.utils.HornetQThreadFactory;
-import org.hornetq.utils.UUIDGenerator;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
- * @author <a href="mailto:ataylor at redhat.com">Andy Taylor</a>
- * @version <tt>$Revision: 3602 $</tt>
- * 
- */
-public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, DiscoveryListener, Serializable
-{
-   // Constants
-   // ------------------------------------------------------------------------------------
-
-   private static final long serialVersionUID = 2512460695662741413L;
-
-   private static final Logger log = Logger.getLogger(ClientSessionFactoryImpl.class);
-
-   public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = "org.hornetq.core.client.impl.RoundRobinConnectionLoadBalancingPolicy";
-
-   public static final long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = 30000;
-
-   // 1 minute - this should be higher than ping period
-   public static final long DEFAULT_CONNECTION_TTL = 1 * 60 * 1000;
-
-   // Any message beyond this size is considered a large message (to be sent in chunks)
-   public static final int DEFAULT_MIN_LARGE_MESSAGE_SIZE = 100 * 1024;
-
-   public static final int DEFAULT_CONSUMER_WINDOW_SIZE = 1024 * 1024;
-
-   public static final int DEFAULT_CONSUMER_MAX_RATE = -1;
-
-   public static final int DEFAULT_CONFIRMATION_WINDOW_SIZE = -1;
-
-   public static final int DEFAULT_PRODUCER_WINDOW_SIZE = 1024 * 1024;
-
-   public static final int DEFAULT_PRODUCER_MAX_RATE = -1;
-
-   public static final boolean DEFAULT_BLOCK_ON_ACKNOWLEDGE = false;
-
-   public static final boolean DEFAULT_BLOCK_ON_DURABLE_SEND = true;
-
-   public static final boolean DEFAULT_BLOCK_ON_NON_DURABLE_SEND = false;
-
-   public static final boolean DEFAULT_AUTO_GROUP = false;
-
-   public static final long DEFAULT_CALL_TIMEOUT = 30000;
-
-   public static final int DEFAULT_ACK_BATCH_SIZE = 1024 * 1024;
-
-   public static final boolean DEFAULT_PRE_ACKNOWLEDGE = false;
-
-   public static final long DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT = 2000;
-
-   public static final long DEFAULT_DISCOVERY_REFRESH_TIMEOUT = 10000;
-
-   public static final long DEFAULT_RETRY_INTERVAL = 2000;
-
-   public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER = 1d;
-
-   public static final long DEFAULT_MAX_RETRY_INTERVAL = 2000;
-
-   public static final int DEFAULT_RECONNECT_ATTEMPTS = 0;
-
-   public static final boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN = false;
-
-   public static final boolean DEFAULT_USE_GLOBAL_POOLS = true;
-
-   public static final int DEFAULT_THREAD_POOL_MAX_SIZE = -1;
-
-   public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 5;
-
-   public static final boolean DEFAULT_CACHE_LARGE_MESSAGE_CLIENT = false;
-
-   public static final int DEFAULT_INITIAL_MESSAGE_PACKET_SIZE = 1500;
-
-   // Attributes
-   // -----------------------------------------------------------------------------------
-
-   private final Map<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager> failoverManagerMap = new LinkedHashMap<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager>();
-
-   private volatile boolean receivedBroadcast = false;
-
-   private ExecutorService threadPool;
-
-   private ScheduledExecutorService scheduledThreadPool;
-
-   private DiscoveryGroup discoveryGroup;
-
-   private ConnectionLoadBalancingPolicy loadBalancingPolicy;
-
-   private FailoverManager[] failoverManagerArray;
-
-   private boolean readOnly;
-
-   // Settable attributes:
-
-   private boolean cacheLargeMessagesClient = ClientSessionFactoryImpl.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
-
-   private List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors;
-
-   private String discoveryAddress;
-
-   private int discoveryPort;
-
-   private long discoveryRefreshTimeout;
-
-   private long discoveryInitialWaitTimeout;
-
-   private long clientFailureCheckPeriod;
-
-   private long connectionTTL;
-
-   private long callTimeout;
-
-   private int minLargeMessageSize;
-
-   private int consumerWindowSize;
-
-   private int consumerMaxRate;
-
-   private int confirmationWindowSize;
-
-   private int producerWindowSize;
-
-   private int producerMaxRate;
-
-   private boolean blockOnAcknowledge;
-
-   private boolean blockOnDurableSend;
-
-   private boolean blockOnNonDurableSend;
-
-   private boolean autoGroup;
-
-   private boolean preAcknowledge;
-
-   private String connectionLoadBalancingPolicyClassName;
-
-   private int ackBatchSize;
-
-   private boolean useGlobalPools;
-
-   private int scheduledThreadPoolMaxSize;
-
-   private int threadPoolMaxSize;
-
-   private long retryInterval;
-
-   private double retryIntervalMultiplier;
-
-   private long maxRetryInterval;
-
-   private int reconnectAttempts;
-
-   private int initialMessagePacketSize;
-
-   private volatile boolean closed;
-
-   private boolean failoverOnServerShutdown;
-
-   private final List<Interceptor> interceptors = new CopyOnWriteArrayList<Interceptor>();
-
-   private static ExecutorService globalThreadPool;
-
-   private static ScheduledExecutorService globalScheduledThreadPool;
-
-   private String groupID;
-
-   private static synchronized ExecutorService getGlobalThreadPool()
-   {
-      if (ClientSessionFactoryImpl.globalThreadPool == null)
-      {
-         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-threads", true);
-
-         ClientSessionFactoryImpl.globalThreadPool = Executors.newCachedThreadPool(factory);
-      }
-
-      return ClientSessionFactoryImpl.globalThreadPool;
-   }
-
-   private static synchronized ScheduledExecutorService getGlobalScheduledThreadPool()
-   {
-      if (ClientSessionFactoryImpl.globalScheduledThreadPool == null)
-      {
-         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-scheduled-threads", true);
-
-         ClientSessionFactoryImpl.globalScheduledThreadPool = Executors.newScheduledThreadPool(ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
-                                                                                               factory);
-      }
-
-      return ClientSessionFactoryImpl.globalScheduledThreadPool;
-   }
-
-   private void setThreadPools()
-   {
-      if (useGlobalPools)
-      {
-         threadPool = ClientSessionFactoryImpl.getGlobalThreadPool();
-
-         scheduledThreadPool = ClientSessionFactoryImpl.getGlobalScheduledThreadPool();
-      }
-      else
-      {
-         ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-factory-threads-" + System.identityHashCode(this),
-                                                          true);
-
-         if (threadPoolMaxSize == -1)
-         {
-            threadPool = Executors.newCachedThreadPool(factory);
-         }
-         else
-         {
-            threadPool = Executors.newFixedThreadPool(threadPoolMaxSize, factory);
-         }
-
-         factory = new HornetQThreadFactory("HornetQ-client-factory-pinger-threads-" + System.identityHashCode(this),
-                                            true);
-
-         scheduledThreadPool = Executors.newScheduledThreadPool(scheduledThreadPoolMaxSize, factory);
-      }
-   }
-
-   private synchronized void initialise() throws Exception
-   {
-      if (!readOnly)
-      {
-         setThreadPools();
-
-         instantiateLoadBalancingPolicy();
-
-         if (discoveryAddress != null)
-         {
-            InetAddress groupAddress = InetAddress.getByName(discoveryAddress);
-
-            discoveryGroup = new DiscoveryGroupImpl(UUIDGenerator.getInstance().generateStringUUID(),
-                                                    discoveryAddress,
-                                                    groupAddress,
-                                                    discoveryPort,
-                                                    discoveryRefreshTimeout);
-
-            discoveryGroup.registerListener(this);
-
-            discoveryGroup.start();
-         }
-         else if (staticConnectors != null)
-         {
-            for (Pair<TransportConfiguration, TransportConfiguration> pair : staticConnectors)
-            {
-               FailoverManager cm = new FailoverManagerImpl(this,
-                                                            pair.a,
-                                                            pair.b,
-                                                            failoverOnServerShutdown,
-                                                            callTimeout,
-                                                            clientFailureCheckPeriod,
-                                                            connectionTTL,
-                                                            retryInterval,
-                                                            retryIntervalMultiplier,
-                                                            maxRetryInterval,
-                                                            reconnectAttempts,
-                                                            threadPool,
-                                                            scheduledThreadPool,
-                                                            interceptors);
-
-               failoverManagerMap.put(pair, cm);
-            }
-
-            updatefailoverManagerArray();
-         }
-         else
-         {
-            throw new IllegalStateException("Before using a session factory you must either set discovery address and port or " + "provide some static transport configuration");
-         }
-         readOnly = true;
-      }
-   }
-
-   // Static
-   // ---------------------------------------------------------------------------------------
-
-   // Constructors
-   // ---------------------------------------------------------------------------------
-
-   public ClientSessionFactoryImpl(final ClientSessionFactory other)
-   {
-      discoveryAddress = other.getDiscoveryAddress();
-
-      discoveryPort = other.getDiscoveryPort();
-
-      staticConnectors = other.getStaticConnectors();
-
-      discoveryRefreshTimeout = other.getDiscoveryRefreshTimeout();
-
-      clientFailureCheckPeriod = other.getClientFailureCheckPeriod();
-
-      connectionTTL = other.getConnectionTTL();
-
-      callTimeout = other.getCallTimeout();
-
-      minLargeMessageSize = other.getMinLargeMessageSize();
-
-      consumerWindowSize = other.getConsumerWindowSize();
-
-      consumerMaxRate = other.getConsumerMaxRate();
-
-      confirmationWindowSize = other.getConfirmationWindowSize();
-
-      producerWindowSize = other.getProducerWindowSize();
-
-      producerMaxRate = other.getProducerMaxRate();
-
-      blockOnAcknowledge = other.isBlockOnAcknowledge();
-
-      blockOnDurableSend = other.isBlockOnDurableSend();
-
-      blockOnNonDurableSend = other.isBlockOnNonDurableSend();
-
-      autoGroup = other.isAutoGroup();
-
-      preAcknowledge = other.isPreAcknowledge();
-
-      ackBatchSize = other.getAckBatchSize();
-
-      connectionLoadBalancingPolicyClassName = other.getConnectionLoadBalancingPolicyClassName();
-
-      discoveryInitialWaitTimeout = other.getDiscoveryInitialWaitTimeout();
-
-      useGlobalPools = other.isUseGlobalPools();
-
-      scheduledThreadPoolMaxSize = other.getScheduledThreadPoolMaxSize();
-
-      threadPoolMaxSize = other.getThreadPoolMaxSize();
-
-      retryInterval = other.getRetryInterval();
-
-      retryIntervalMultiplier = other.getRetryIntervalMultiplier();
-
-      maxRetryInterval = other.getMaxRetryInterval();
-
-      reconnectAttempts = other.getReconnectAttempts();
-
-      failoverOnServerShutdown = other.isFailoverOnServerShutdown();
-
-      cacheLargeMessagesClient = other.isCacheLargeMessagesClient();
-
-      initialMessagePacketSize = other.getInitialMessagePacketSize();
-
-      groupID = other.getGroupID();
-   }
-
-   public ClientSessionFactoryImpl()
-   {
-      discoveryRefreshTimeout = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_REFRESH_TIMEOUT;
-
-      clientFailureCheckPeriod = ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD;
-
-      connectionTTL = ClientSessionFactoryImpl.DEFAULT_CONNECTION_TTL;
-
-      callTimeout = ClientSessionFactoryImpl.DEFAULT_CALL_TIMEOUT;
-
-      minLargeMessageSize = ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
-
-      consumerWindowSize = ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
-
-      consumerMaxRate = ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
-
-      confirmationWindowSize = ClientSessionFactoryImpl.DEFAULT_CONFIRMATION_WINDOW_SIZE;
-
-      producerWindowSize = ClientSessionFactoryImpl.DEFAULT_PRODUCER_WINDOW_SIZE;
-
-      producerMaxRate = ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
-
-      blockOnAcknowledge = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE;
-
-      blockOnDurableSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_DURABLE_SEND;
-
-      blockOnNonDurableSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_DURABLE_SEND;
-
-      autoGroup = ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP;
-
-      preAcknowledge = ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
-
-      ackBatchSize = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
-
-      connectionLoadBalancingPolicyClassName = ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
-
-      discoveryInitialWaitTimeout = ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
-
-      useGlobalPools = ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS;
-
-      scheduledThreadPoolMaxSize = ClientSessionFactoryImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
-
-      threadPoolMaxSize = ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE;
-
-      retryInterval = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL;
-
-      retryIntervalMultiplier = ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER;
-
-      maxRetryInterval = ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
-
-      reconnectAttempts = ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS;
-
-      failoverOnServerShutdown = ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
-
-      cacheLargeMessagesClient = ClientSessionFactoryImpl.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
-
-      initialMessagePacketSize = ClientSessionFactoryImpl.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
-   }
-
-   public ClientSessionFactoryImpl(final String discoveryAddress, final int discoveryPort)
-   {
-      this();
-
-      this.discoveryAddress = discoveryAddress;
-
-      this.discoveryPort = discoveryPort;
-   }
-
-   public ClientSessionFactoryImpl(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
-   {
-      this();
-
-      this.staticConnectors = staticConnectors;
-   }
-
-   public ClientSessionFactoryImpl(final TransportConfiguration connectorConfig,
-                                   final TransportConfiguration backupConnectorConfig)
-   {
-      this();
-
-      staticConnectors = new ArrayList<Pair<TransportConfiguration, TransportConfiguration>>();
-
-      staticConnectors.add(new Pair<TransportConfiguration, TransportConfiguration>(connectorConfig,
-                                                                                    backupConnectorConfig));
-   }
-
-   public ClientSessionFactoryImpl(final TransportConfiguration connectorConfig)
-   {
-      this(connectorConfig, null);
-   }
-
-   // ClientSessionFactory implementation------------------------------------------------------------
-
-   public synchronized boolean isCacheLargeMessagesClient()
-   {
-      return cacheLargeMessagesClient;
-   }
-
-   public synchronized void setCacheLargeMessagesClient(final boolean cached)
-   {
-      cacheLargeMessagesClient = cached;
-   }
-
-   public synchronized List<Pair<TransportConfiguration, TransportConfiguration>> getStaticConnectors()
-   {
-      return staticConnectors;
-   }
-
-   public synchronized void setStaticConnectors(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
-   {
-      checkWrite();
-
-      this.staticConnectors = staticConnectors;
-   }
-
-   public synchronized long getClientFailureCheckPeriod()
-   {
-      return clientFailureCheckPeriod;
-   }
-
-   public synchronized void setClientFailureCheckPeriod(final long clientFailureCheckPeriod)
-   {
-      checkWrite();
-      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
-   }
-
-   public synchronized long getConnectionTTL()
-   {
-      return connectionTTL;
-   }
-
-   public synchronized void setConnectionTTL(final long connectionTTL)
-   {
-      checkWrite();
-      this.connectionTTL = connectionTTL;
-   }
-
-   public synchronized long getCallTimeout()
-   {
-      return callTimeout;
-   }
-
-   public synchronized void setCallTimeout(final long callTimeout)
-   {
-      checkWrite();
-      this.callTimeout = callTimeout;
-   }
-
-   public synchronized int getMinLargeMessageSize()
-   {
-      return minLargeMessageSize;
-   }
-
-   public synchronized void setMinLargeMessageSize(final int minLargeMessageSize)
-   {
-      checkWrite();
-      this.minLargeMessageSize = minLargeMessageSize;
-   }
-
-   public synchronized int getConsumerWindowSize()
-   {
-      return consumerWindowSize;
-   }
-
-   public synchronized void setConsumerWindowSize(final int consumerWindowSize)
-   {
-      checkWrite();
-      this.consumerWindowSize = consumerWindowSize;
-   }
-
-   public synchronized int getConsumerMaxRate()
-   {
-      return consumerMaxRate;
-   }
-
-   public synchronized void setConsumerMaxRate(final int consumerMaxRate)
-   {
-      checkWrite();
-      this.consumerMaxRate = consumerMaxRate;
-   }
-
-   public synchronized int getConfirmationWindowSize()
-   {
-      return confirmationWindowSize;
-   }
-
-   public synchronized void setConfirmationWindowSize(final int confirmationWindowSize)
-   {
-      checkWrite();
-      this.confirmationWindowSize = confirmationWindowSize;
-   }
-
-   public synchronized int getProducerWindowSize()
-   {
-      return producerWindowSize;
-   }
-
-   public synchronized void setProducerWindowSize(final int producerWindowSize)
-   {
-      checkWrite();
-      this.producerWindowSize = producerWindowSize;
-   }
-
-   public synchronized int getProducerMaxRate()
-   {
-      return producerMaxRate;
-   }
-
-   public synchronized void setProducerMaxRate(final int producerMaxRate)
-   {
-      checkWrite();
-      this.producerMaxRate = producerMaxRate;
-   }
-
-   public synchronized boolean isBlockOnAcknowledge()
-   {
-      return blockOnAcknowledge;
-   }
-
-   public synchronized void setBlockOnAcknowledge(final boolean blockOnAcknowledge)
-   {
-      checkWrite();
-      this.blockOnAcknowledge = blockOnAcknowledge;
-   }
-
-   public synchronized boolean isBlockOnDurableSend()
-   {
-      return blockOnDurableSend;
-   }
-
-   public synchronized void setBlockOnDurableSend(final boolean blockOnDurableSend)
-   {
-      checkWrite();
-      this.blockOnDurableSend = blockOnDurableSend;
-   }
-
-   public synchronized boolean isBlockOnNonDurableSend()
-   {
-      return blockOnNonDurableSend;
-   }
-
-   public synchronized void setBlockOnNonDurableSend(final boolean blockOnNonDurableSend)
-   {
-      checkWrite();
-      this.blockOnNonDurableSend = blockOnNonDurableSend;
-   }
-
-   public synchronized boolean isAutoGroup()
-   {
-      return autoGroup;
-   }
-
-   public synchronized void setAutoGroup(final boolean autoGroup)
-   {
-      checkWrite();
-      this.autoGroup = autoGroup;
-   }
-
-   public synchronized boolean isPreAcknowledge()
-   {
-      return preAcknowledge;
-   }
-
-   public synchronized void setPreAcknowledge(final boolean preAcknowledge)
-   {
-      checkWrite();
-      this.preAcknowledge = preAcknowledge;
-   }
-
-   public synchronized int getAckBatchSize()
-   {
-      return ackBatchSize;
-   }
-
-   public synchronized void setAckBatchSize(final int ackBatchSize)
-   {
-      checkWrite();
-      this.ackBatchSize = ackBatchSize;
-   }
-
-   public synchronized long getDiscoveryInitialWaitTimeout()
-   {
-      return discoveryInitialWaitTimeout;
-   }
-
-   public synchronized void setDiscoveryInitialWaitTimeout(final long initialWaitTimeout)
-   {
-      checkWrite();
-      discoveryInitialWaitTimeout = initialWaitTimeout;
-   }
-
-   public synchronized boolean isUseGlobalPools()
-   {
-      return useGlobalPools;
-   }
-
-   public synchronized void setUseGlobalPools(final boolean useGlobalPools)
-   {
-      checkWrite();
-      this.useGlobalPools = useGlobalPools;
-   }
-
-   public synchronized int getScheduledThreadPoolMaxSize()
-   {
-      return scheduledThreadPoolMaxSize;
-   }
-
-   public synchronized void setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize)
-   {
-      checkWrite();
-      this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize;
-   }
-
-   public synchronized int getThreadPoolMaxSize()
-   {
-      return threadPoolMaxSize;
-   }
-
-   public synchronized void setThreadPoolMaxSize(final int threadPoolMaxSize)
-   {
-      checkWrite();
-      this.threadPoolMaxSize = threadPoolMaxSize;
-   }
-
-   public synchronized long getRetryInterval()
-   {
-      return retryInterval;
-   }
-
-   public synchronized void setRetryInterval(final long retryInterval)
-   {
-      checkWrite();
-      this.retryInterval = retryInterval;
-   }
-
-   public synchronized long getMaxRetryInterval()
-   {
-      return maxRetryInterval;
-   }
-
-   public synchronized void setMaxRetryInterval(final long retryInterval)
-   {
-      checkWrite();
-      maxRetryInterval = retryInterval;
-   }
-
-   public synchronized double getRetryIntervalMultiplier()
-   {
-      return retryIntervalMultiplier;
-   }
-
-   public synchronized void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
-   {
-      checkWrite();
-      this.retryIntervalMultiplier = retryIntervalMultiplier;
-   }
-
-   public synchronized int getReconnectAttempts()
-   {
-      return reconnectAttempts;
-   }
-
-   public synchronized void setReconnectAttempts(final int reconnectAttempts)
-   {
-      checkWrite();
-      this.reconnectAttempts = reconnectAttempts;
-   }
-
-   public synchronized boolean isFailoverOnServerShutdown()
-   {
-      return failoverOnServerShutdown;
-   }
-
-   public synchronized void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
-   {
-      checkWrite();
-      this.failoverOnServerShutdown = failoverOnServerShutdown;
-   }
-
-   public synchronized String getConnectionLoadBalancingPolicyClassName()
-   {
-      return connectionLoadBalancingPolicyClassName;
-   }
-
-   public synchronized void setConnectionLoadBalancingPolicyClassName(final String loadBalancingPolicyClassName)
-   {
-      checkWrite();
-      connectionLoadBalancingPolicyClassName = loadBalancingPolicyClassName;
-   }
-
-   public synchronized String getDiscoveryAddress()
-   {
-      return discoveryAddress;
-   }
-
-   public synchronized void setDiscoveryAddress(final String discoveryAddress)
-   {
-      checkWrite();
-      this.discoveryAddress = discoveryAddress;
-   }
-
-   public synchronized int getDiscoveryPort()
-   {
-      return discoveryPort;
-   }
-
-   public synchronized void setDiscoveryPort(final int discoveryPort)
-   {
-      checkWrite();
-      this.discoveryPort = discoveryPort;
-   }
-
-   public synchronized long getDiscoveryRefreshTimeout()
-   {
-      return discoveryRefreshTimeout;
-   }
-
-   public void addInterceptor(final Interceptor interceptor)
-   {
-      interceptors.add(interceptor);
-   }
-
-   public boolean removeInterceptor(final Interceptor interceptor)
-   {
-      return interceptors.remove(interceptor);
-   }
-
-   public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
-   {
-      checkWrite();
-      this.discoveryRefreshTimeout = discoveryRefreshTimeout;
-   }
-
-   public synchronized int getInitialMessagePacketSize()
-   {
-      return initialMessagePacketSize;
-   }
-
-   public synchronized void setInitialMessagePacketSize(final int size)
-   {
-      checkWrite();
-      initialMessagePacketSize = size;
-   }
-
-   public ClientSession createSession(final String username,
-                                      final String password,
-                                      final boolean xa,
-                                      final boolean autoCommitSends,
-                                      final boolean autoCommitAcks,
-                                      final boolean preAcknowledge,
-                                      final int ackBatchSize) throws HornetQException
-   {
-      return createSessionInternal(username,
-                                   password,
-                                   xa,
-                                   autoCommitSends,
-                                   autoCommitAcks,
-                                   preAcknowledge,
-                                   ackBatchSize);
-   }
-
-   public ClientSession createSession(final boolean autoCommitSends,
-                                      final boolean autoCommitAcks,
-                                      final int ackBatchSize) throws HornetQException
-   {
-      return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createXASession() throws HornetQException
-   {
-      return createSessionInternal(null, null, true, false, false, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createTransactedSession() throws HornetQException
-   {
-      return createSessionInternal(null, null, false, false, false, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createSession() throws HornetQException
-   {
-      return createSessionInternal(null, null, false, true, true, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException
-   {
-      return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks) throws HornetQException
-   {
-      return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
-   }
-
-   public ClientSession createSession(final boolean xa,
-                                      final boolean autoCommitSends,
-                                      final boolean autoCommitAcks,
-                                      final boolean preAcknowledge) throws HornetQException
-   {
-      return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize);
-   }
-
-   public int numSessions()
-   {
-      int num = 0;
-
-      for (FailoverManager failoverManager : failoverManagerMap.values())
-      {
-         num += failoverManager.numSessions();
-      }
-
-      return num;
-   }
-
-   public int numConnections()
-   {
-      int num = 0;
-
-      for (FailoverManager failoverManager : failoverManagerMap.values())
-      {
-         num += failoverManager.numConnections();
-      }
-
-      return num;
-   }
-
-   public void close()
-   {
-      if (closed)
-      {
-         return;
-      }
-
-      if (discoveryGroup != null)
-      {
-         try
-         {
-            discoveryGroup.stop();
-         }
-         catch (Exception e)
-         {
-            ClientSessionFactoryImpl.log.error("Failed to stop discovery group", e);
-         }
-      }
-
-      for (FailoverManager failoverManager : failoverManagerMap.values())
-      {
-         failoverManager.causeExit();
-      }
-
-      failoverManagerMap.clear();
-
-      if (!useGlobalPools)
-      {
-         if (threadPool != null)
-         {
-            threadPool.shutdown();
-
-            try
-            {
-               if (!threadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
-               {
-                  ClientSessionFactoryImpl.log.warn("Timed out waiting for pool to terminate");
-               }
-            }
-            catch (InterruptedException ignore)
-            {
-            }
-         }
-
-         if (scheduledThreadPool != null)
-         {
-            scheduledThreadPool.shutdown();
-
-            try
-            {
-               if (!scheduledThreadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
-               {
-                  ClientSessionFactoryImpl.log.warn("Timed out waiting for scheduled pool to terminate");
-               }
-            }
-            catch (InterruptedException ignore)
-            {
-            }
-         }
-      }
-
-      closed = true;
-   }
-
-   public ClientSessionFactory copy()
-   {
-      return new ClientSessionFactoryImpl(this);
-   }
-
-   public void setGroupID(final String groupID)
-   {
-      this.groupID = groupID;
-   }
-
-   public String getGroupID()
-   {
-      return groupID;
-   }
-
-   // DiscoveryListener implementation --------------------------------------------------------
-
-   public synchronized void connectorsChanged()
-   {
-      receivedBroadcast = true;
-
-      Map<String, DiscoveryEntry> newConnectors = discoveryGroup.getDiscoveryEntryMap();
-
-      Set<Pair<TransportConfiguration, TransportConfiguration>> connectorSet = new HashSet<Pair<TransportConfiguration, TransportConfiguration>>();
-
-      for (DiscoveryEntry entry : newConnectors.values())
-      {
-         connectorSet.add(entry.getConnectorPair());
-      }
-
-      Iterator<Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager>> iter = failoverManagerMap.entrySet()
-                                                                                                                          .iterator();
-      while (iter.hasNext())
-      {
-         Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, FailoverManager> entry = iter.next();
-
-         if (!connectorSet.contains(entry.getKey()))
-         {
-            // failoverManager no longer there - we should remove it
-
-            iter.remove();
-         }
-      }
-
-      for (Pair<TransportConfiguration, TransportConfiguration> connectorPair : connectorSet)
-      {
-         if (!failoverManagerMap.containsKey(connectorPair))
-         {
-            // Create a new failoverManager
-
-            FailoverManager failoverManager = new FailoverManagerImpl(this,
-                                                                      connectorPair.a,
-                                                                      connectorPair.b,
-                                                                      failoverOnServerShutdown,
-                                                                      callTimeout,
-                                                                      clientFailureCheckPeriod,
-                                                                      connectionTTL,
-                                                                      retryInterval,
-                                                                      retryIntervalMultiplier,
-                                                                      maxRetryInterval,
-                                                                      reconnectAttempts,
-                                                                      threadPool,
-                                                                      scheduledThreadPool,
-                                                                      interceptors);
-
-            failoverManagerMap.put(connectorPair, failoverManager);
-         }
-      }
-
-      updatefailoverManagerArray();
-   }
-
-   public FailoverManager[] getFailoverManagers()
-   {
-      return failoverManagerArray;
-   }
-
-   // Protected ------------------------------------------------------------------------------
-
-   @Override
-   protected void finalize() throws Throwable
-   {
-      close();
-
-      super.finalize();
-   }
-
-   // Private --------------------------------------------------------------------------------
-
-   private void checkWrite()
-   {
-      if (readOnly)
-      {
-         throw new IllegalStateException("Cannot set attribute on SessionFactory after it has been used");
-      }
-   }
-
-   private ClientSession createSessionInternal(final String username,
-                                               final String password,
-                                               final boolean xa,
-                                               final boolean autoCommitSends,
-                                               final boolean autoCommitAcks,
-                                               final boolean preAcknowledge,
-                                               final int ackBatchSize) throws HornetQException
-   {
-      if (closed)
-      {
-         throw new IllegalStateException("Cannot create session, factory is closed (maybe it has been garbage collected)");
-      }
-
-      try
-      {
-         initialise();
-      }
-      catch (Exception e)
-      {
-         throw new HornetQException(HornetQException.INTERNAL_ERROR, "Failed to initialise session factory", e);
-      }
-
-      if (discoveryGroup != null && !receivedBroadcast)
-      {
-         boolean ok = discoveryGroup.waitForBroadcast(discoveryInitialWaitTimeout);
-
-         if (!ok)
-         {
-            throw new HornetQException(HornetQException.CONNECTION_TIMEDOUT,
-                                       "Timed out waiting to receive initial broadcast from discovery group");
-         }
-      }
-
-      synchronized (this)
-      {
-         int pos = loadBalancingPolicy.select(failoverManagerArray.length);
-
-         FailoverManager failoverManager = failoverManagerArray[pos];
-
-         ClientSession session = failoverManager.createSession(username,
-                                                               password,
-                                                               xa,
-                                                               autoCommitSends,
-                                                               autoCommitAcks,
-                                                               preAcknowledge,
-                                                               ackBatchSize,
-                                                               cacheLargeMessagesClient,
-                                                               minLargeMessageSize,
-                                                               blockOnAcknowledge,
-                                                               autoGroup,
-                                                               confirmationWindowSize,
-                                                               producerWindowSize,
-                                                               consumerWindowSize,
-                                                               producerMaxRate,
-                                                               consumerMaxRate,
-                                                               blockOnNonDurableSend,
-                                                               blockOnDurableSend,
-                                                               initialMessagePacketSize,
-                                                               groupID);
-
-         return session;
-      }
-   }
-
-   private void instantiateLoadBalancingPolicy()
-   {
-      if (connectionLoadBalancingPolicyClassName == null)
-      {
-         throw new IllegalStateException("Please specify a load balancing policy class name on the session factory");
-      }
-
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         Class<?> clazz = loader.loadClass(connectionLoadBalancingPolicyClassName);
-         loadBalancingPolicy = (ConnectionLoadBalancingPolicy)clazz.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + connectionLoadBalancingPolicyClassName +
-                                                     "\"",
-                                            e);
-      }
-   }
-
-   private synchronized void updatefailoverManagerArray()
-   {
-      failoverManagerArray = new FailoverManager[failoverManagerMap.size()];
-
-      failoverManagerMap.values().toArray(failoverManagerArray);
-   }
-
-}

Deleted: trunk/src/main/org/hornetq/core/client/impl/FirstElementConnectionLoadBalancingPolicy.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/FirstElementConnectionLoadBalancingPolicy.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/impl/FirstElementConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,33 +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.core.client.impl;
-
-import org.hornetq.core.client.ConnectionLoadBalancingPolicy;
-
-/**
- * A FirstElementConnectionLoadBalancingPolicy
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 28 Nov 2008 10:56:59
- *
- *
- */
-public class FirstElementConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
-{
-   public int select(final int max)
-   {
-      return 0;
-   }
-}

Deleted: trunk/src/main/org/hornetq/core/client/impl/RandomConnectionLoadBalancingPolicy.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/RandomConnectionLoadBalancingPolicy.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/impl/RandomConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,36 +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.core.client.impl;
-
-import org.hornetq.core.client.ConnectionLoadBalancingPolicy;
-import org.hornetq.utils.Random;
-
-/**
- * A RandomConnectionLoadBalancingPolicy
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 28 Nov 2008 10:24:11
- *
- *
- */
-public class RandomConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
-{
-   private final Random random = new Random();
-
-   public int select(final int max)
-   {
-      return random.getRandom().nextInt(max);
-   }
-}

Deleted: trunk/src/main/org/hornetq/core/client/impl/RoundRobinConnectionLoadBalancingPolicy.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/RoundRobinConnectionLoadBalancingPolicy.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/client/impl/RoundRobinConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,57 +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.core.client.impl;
-
-import org.hornetq.core.client.ConnectionLoadBalancingPolicy;
-import org.hornetq.utils.Random;
-
-/**
- * A RoundRobinConnectionLoadBalancingPolicy
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 28 Nov 2008 10:21:08
- *
- *
- */
-public class RoundRobinConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
-{
-   private final Random random = new Random();
-
-   private boolean first = true;
-
-   private int pos;
-
-   public int select(final int max)
-   {
-      if (first)
-      {
-         // We start on a random one
-         pos = random.getRandom().nextInt(max);
-
-         first = false;
-      }
-      else
-      {
-         pos++;
-
-         if (pos >= max)
-         {
-            pos = 0;
-         }
-      }
-
-      return pos;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/client/loadbalance/ConnectionLoadBalancingPolicy.java (from rev 8667, trunk/src/main/org/hornetq/core/client/ConnectionLoadBalancingPolicy.java)
===================================================================
--- trunk/src/main/org/hornetq/core/client/loadbalance/ConnectionLoadBalancingPolicy.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/client/loadbalance/ConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,29 @@
+/*
+ * 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.core.client.loadbalance;
+
+/**
+ * A ConnectionLoadBalancingPolicy defines a policy to load balance between connections.
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ */
+public interface ConnectionLoadBalancingPolicy
+{
+   /**
+    * Returns the selected index according to the policy implementation.
+    *
+    * @param max maximum position index that can be selected
+    */
+   int select(int max);
+}

Copied: trunk/src/main/org/hornetq/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java (from rev 8663, trunk/src/main/org/hornetq/core/client/impl/FirstElementConnectionLoadBalancingPolicy.java)
===================================================================
--- trunk/src/main/org/hornetq/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,32 @@
+/*
+ * 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.core.client.loadbalance;
+
+
+/**
+ * A FirstElementConnectionLoadBalancingPolicy
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 28 Nov 2008 10:56:59
+ *
+ *
+ */
+public class FirstElementConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
+{
+   public int select(final int max)
+   {
+      return 0;
+   }
+}

Copied: trunk/src/main/org/hornetq/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java (from rev 8663, trunk/src/main/org/hornetq/core/client/impl/RandomConnectionLoadBalancingPolicy.java)
===================================================================
--- trunk/src/main/org/hornetq/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,35 @@
+/*
+ * 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.core.client.loadbalance;
+
+import org.hornetq.utils.Random;
+
+/**
+ * A RandomConnectionLoadBalancingPolicy
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 28 Nov 2008 10:24:11
+ *
+ *
+ */
+public class RandomConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
+{
+   private final Random random = new Random();
+
+   public int select(final int max)
+   {
+      return random.getRandom().nextInt(max);
+   }
+}

Copied: trunk/src/main/org/hornetq/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java (from rev 8663, trunk/src/main/org/hornetq/core/client/impl/RoundRobinConnectionLoadBalancingPolicy.java)
===================================================================
--- trunk/src/main/org/hornetq/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,56 @@
+/*
+ * 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.core.client.loadbalance;
+
+import org.hornetq.utils.Random;
+
+/**
+ * A RoundRobinConnectionLoadBalancingPolicy
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 28 Nov 2008 10:21:08
+ *
+ *
+ */
+public class RoundRobinConnectionLoadBalancingPolicy implements ConnectionLoadBalancingPolicy
+{
+   private final Random random = new Random();
+
+   private boolean first = true;
+
+   private int pos;
+
+   public int select(final int max)
+   {
+      if (first)
+      {
+         // We start on a random one
+         pos = random.getRandom().nextInt(max);
+
+         first = false;
+      }
+      else
+      {
+         pos++;
+
+         if (pos >= max)
+         {
+            pos = 0;
+         }
+      }
+
+      return pos;
+   }
+}

Modified: trunk/src/main/org/hornetq/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/Configuration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/Configuration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -44,7 +44,7 @@
    /**
     * Returns whether this server is clustered.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_CLUSTERED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_CLUSTERED}.
     */
    boolean isClustered();
 
@@ -56,7 +56,7 @@
    /**
     * Returns whether delivery count is persisted before messages are delivered to the consumers.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY}.
     */
    boolean isPersistDeliveryCountBeforeDelivery();
 
@@ -70,7 +70,7 @@
     * <br>
     * If a backup server has been activated, returns {@code false}.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_BACKUP}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_BACKUP}.
     */
    boolean isBackup();
 
@@ -82,7 +82,7 @@
    /**
     * Returns whether this server shares its data store with a corresponding live or backup server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_SHARED_STORE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_SHARED_STORE}.
     */
    boolean isSharedStore();
 
@@ -94,7 +94,7 @@
    /**
     * Returns whether this server will use files to configure and deploy its resources.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_FILE_DEPLOYMENT_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_FILE_DEPLOYMENT_ENABLED}.
     */
    boolean isFileDeploymentEnabled();
 
@@ -106,7 +106,7 @@
    /**
     * Returns whether this server is using persistence and store data.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_PERSISTENCE_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_PERSISTENCE_ENABLED}.
     */
    boolean isPersistenceEnabled();
 
@@ -118,7 +118,7 @@
    /**
     * Returns the period (in milliseconds) to scan configuration files used by deployment.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_FILE_DEPLOYER_SCAN_PERIOD}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_FILE_DEPLOYER_SCAN_PERIOD}.
     */
    long getFileDeployerScanPeriod();
 
@@ -130,7 +130,7 @@
    /**
     * Returns the maximum number of threads in the thread pool of this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_THREAD_POOL_MAX_SIZE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_THREAD_POOL_MAX_SIZE}.
     */
    int getThreadPoolMaxSize();
 
@@ -142,7 +142,7 @@
    /**
     * Returns the maximum number of threads in the <em>scheduled</em> thread pool of this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}.
     */
    int getScheduledThreadPoolMaxSize();
 
@@ -154,7 +154,7 @@
    /**
     * Returns the interval time (in milliseconds) to invalidate security credentials.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_SECURITY_INVALIDATION_INTERVAL}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_SECURITY_INVALIDATION_INTERVAL}.
     */
    long getSecurityInvalidationInterval();
 
@@ -166,7 +166,7 @@
    /**
     * Returns whether security is enabled for this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_SECURITY_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_SECURITY_ENABLED}.
     */
    boolean isSecurityEnabled();
 
@@ -178,7 +178,7 @@
    /**
     * Returns whether this server is manageable using JMX or not.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JMX_MANAGEMENT_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JMX_MANAGEMENT_ENABLED}.
     */
    boolean isJMXManagementEnabled();
 
@@ -190,7 +190,7 @@
    /**
     * Returns the domain used by JMX MBeans (provided JMX management is enabled).
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JMX_DOMAIN}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JMX_DOMAIN}.
     */
    String getJMXDomain();
 
@@ -219,7 +219,7 @@
     * <br>
     * This value overrides the connection time to live <em>sent by the client</em>.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_CONNECTION_TTL_OVERRIDE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_CONNECTION_TTL_OVERRIDE}.
     */
    long getConnectionTTLOverride();
 
@@ -231,7 +231,7 @@
    /**
     * Returns whether code coming from connection is executed asynchronously or not.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED}.
     */
    boolean isAsyncConnectionExecutionEnabled();
 
@@ -373,7 +373,7 @@
    /**
     * Returns the management cluster user for this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MANAGEMENT_CLUSTER_USER}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MANAGEMENT_CLUSTER_USER}.
     */
    String getManagementClusterUser();
 
@@ -385,7 +385,7 @@
    /**
     * Returns the management cluster password for this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MANAGEMENT_CLUSTER_PASSWORD}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MANAGEMENT_CLUSTER_PASSWORD}.
     */
    String getManagementClusterPassword();
 
@@ -397,7 +397,7 @@
    /**
     * Returns the size of the cache for pre-creating message IDs.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_ID_CACHE_SIZE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_ID_CACHE_SIZE}.
     */
    int getIDCacheSize();
 
@@ -409,7 +409,7 @@
    /**
     * Returns whether message ID cache is persisted.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_PERSIST_ID_CACHE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_PERSIST_ID_CACHE}.
     */
    boolean isPersistIDCache();
 
@@ -437,7 +437,7 @@
    /**
     * Returns the file system directory used to store bindings.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_BINDINGS_DIRECTORY}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_BINDINGS_DIRECTORY}.
     */
    String getBindingsDirectory();
 
@@ -449,7 +449,7 @@
    /**
     * Returns the file system directory used to store journal log.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_DIR}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_DIR}.
     */
    String getJournalDirectory();
 
@@ -473,7 +473,7 @@
    /**
     * Returns whether the journal is synchronized when receiving transactional data.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_SYNC_TRANSACTIONAL}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_SYNC_TRANSACTIONAL}.
     */
    boolean isJournalSyncTransactional();
 
@@ -485,7 +485,7 @@
    /**
     * Returns whether the journal is synchronized when receiving non-transactional data.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL}.
     */
    boolean isJournalSyncNonTransactional();
 
@@ -497,7 +497,7 @@
    /**
     * Returns the size (in bytes) of each journal files.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_FILE_SIZE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_FILE_SIZE}.
     */
    int getJournalFileSize();
 
@@ -509,7 +509,7 @@
    /**
     * Returns the minimal number of journal files before compacting.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_COMPACT_MIN_FILES}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_COMPACT_MIN_FILES}.
     */
    int getJournalCompactMinFiles();
 
@@ -521,7 +521,7 @@
    /**
     * Returns the percentage of live data before compacting the journal.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_COMPACT_PERCENTAGE}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_COMPACT_PERCENTAGE}.
     */
    int getJournalCompactPercentage();
 
@@ -533,7 +533,7 @@
    /**
     * Returns the number of journal files to pre-create.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_MIN_FILES}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_MIN_FILES}.
     */
    int getJournalMinFiles();
 
@@ -547,7 +547,7 @@
    /**
     * Returns the maximum number of write requests that can be in the AIO queue at any given time.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_MAX_IO_AIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_MAX_IO_AIO}.
     */
    int getJournalMaxIO_AIO();
 
@@ -559,7 +559,7 @@
    /**
     * Returns the timeout (in nanoseconds) used to flush buffers in the AIO queue.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO}.
     */
    int getJournalBufferTimeout_AIO();
 
@@ -571,7 +571,7 @@
    /**
     * Returns the buffer size (in bytes) for AIO.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_SIZE_AIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_SIZE_AIO}.
     */
    int getJournalBufferSize_AIO();
 
@@ -583,7 +583,7 @@
    /**
     * Returns the maximum number of write requests for NIO journal.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_MAX_IO_NIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_MAX_IO_NIO}.
     */
    int getJournalMaxIO_NIO();
 
@@ -595,7 +595,7 @@
    /**
     * Returns the timeout (in nanoseconds) used to flush buffers in the NIO.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO}.
     */
    int getJournalBufferTimeout_NIO();
 
@@ -607,7 +607,7 @@
    /**
     * Returns the buffer size (in bytes) for NIO.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_SIZE_NIO}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_JOURNAL_BUFFER_SIZE_NIO}.
     */
    int getJournalBufferSize_NIO();
 
@@ -619,7 +619,7 @@
    /**
     * Returns whether the bindings directory is created on this server startup.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_CREATE_BINDINGS_DIR}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_CREATE_BINDINGS_DIR}.
     */
    boolean isCreateBindingsDir();
 
@@ -631,7 +631,7 @@
    /**
     * Returns whether the journal directory is created on this server startup.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_CREATE_JOURNAL_DIR}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_CREATE_JOURNAL_DIR}.
     */
    boolean isCreateJournalDir();
 
@@ -671,7 +671,7 @@
    /**
     * Returns the file system directory used to store paging files.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_PAGING_DIR}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_PAGING_DIR}.
     */
    String getPagingDirectory();
 
@@ -685,7 +685,7 @@
    /**
     * Returns the file system directory used to store large messages.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_LARGE_MESSAGES_DIR}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_LARGE_MESSAGES_DIR}.
     */
    String getLargeMessagesDirectory();
 
@@ -699,7 +699,7 @@
    /**
     * Returns whether wildcard routing is supported by this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_WILDCARD_ROUTING_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_WILDCARD_ROUTING_ENABLED}.
     */
    boolean isWildcardRoutingEnabled();
 
@@ -712,7 +712,7 @@
     * Returns the timeout (in milliseconds) after which transactions is removed 
     * from the resource manager after it was created.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_TRANSACTION_TIMEOUT}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_TRANSACTION_TIMEOUT}.
     */
    long getTransactionTimeout();
 
@@ -725,7 +725,7 @@
    /**
     * Returns whether message counter is enabled for this server.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_ENABLED}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_ENABLED}.
     */
    boolean isMessageCounterEnabled();
 
@@ -737,7 +737,7 @@
    /**
     * Returns the sample period (in milliseconds) to take message counter snapshot.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD}.
     */
    long getMessageCounterSamplePeriod();
 
@@ -751,7 +751,7 @@
    /**
     * Returns the maximum number of days kept in memory for message counter.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY}.
     */
    int getMessageCounterMaxDayHistory();
 
@@ -766,7 +766,7 @@
     * Returns the frequency (in milliseconds)  to scan transactions to detect which transactions 
     * have timed out.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}.
     */
    long getTransactionTimeoutScanPeriod();
 
@@ -780,7 +780,7 @@
     * Returns the frequency (in milliseconds)  to scan messages to detect which messages 
     * have expired.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}.
     */
    long getMessageExpiryScanPeriod();
 
@@ -793,7 +793,7 @@
    /**
     * Returns the priority of the thread used to scan message expiration.
     * <br>
-    * Default value is {@value org.hornetq.core.config.impl.ConfigurationImpl#DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY}.
+    * Default value is {@value org.hornetq.core.config.ConfigurationImpl#DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY}.
     */
    int getMessageExpiryThreadPriority();
 

Copied: trunk/src/main/org/hornetq/core/config/ConfigurationImpl.java (from rev 8708, trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/ConfigurationImpl.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/ConfigurationImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,1277 @@
+/*
+ * 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.core.config;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hornetq.SimpleString;
+import org.hornetq.core.config.cluster.BridgeConfiguration;
+import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
+import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
+import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
+import org.hornetq.core.config.cluster.DivertConfiguration;
+import org.hornetq.core.config.cluster.QueueConfiguration;
+import org.hornetq.core.logging.impl.JULLogDelegateFactory;
+import org.hornetq.core.server.JournalType;
+import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
+
+/**
+ * @author <a href="mailto:ataylor at redhat.com>Andy Taylor</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ */
+public class ConfigurationImpl implements Configuration
+{
+   // Constants ------------------------------------------------------------------------------
+
+   private static final long serialVersionUID = 4077088945050267843L;
+
+   public static final boolean DEFAULT_CLUSTERED = false;
+
+   public static final boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false;
+
+   public static final boolean DEFAULT_BACKUP = false;
+
+   public static final boolean DEFAULT_SHARED_STORE = false;
+
+   public static final boolean DEFAULT_FILE_DEPLOYMENT_ENABLED = false;
+
+   public static final boolean DEFAULT_PERSISTENCE_ENABLED = true;
+
+   public static final long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000;
+
+   public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 5;
+
+   public static final int DEFAULT_THREAD_POOL_MAX_SIZE = -1;
+
+   public static final long DEFAULT_SECURITY_INVALIDATION_INTERVAL = 10000;
+
+   public static final boolean DEFAULT_SECURITY_ENABLED = true;
+
+   public static final boolean DEFAULT_JMX_MANAGEMENT_ENABLED = true;
+
+   public static final String DEFAULT_JMX_DOMAIN = "org.hornetq";
+
+   public static final long DEFAULT_CONNECTION_TTL_OVERRIDE = -1;
+
+   public static final boolean DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED = false;
+
+   public static final String DEFAULT_BINDINGS_DIRECTORY = "data/bindings";
+
+   public static final boolean DEFAULT_CREATE_BINDINGS_DIR = true;
+
+   public static final String DEFAULT_JOURNAL_DIR = "data/journal";
+
+   public static final String DEFAULT_PAGING_DIR = "data/paging";
+
+   public static final String DEFAULT_LARGE_MESSAGES_DIR = "data/largemessages";
+
+   public static final boolean DEFAULT_CREATE_JOURNAL_DIR = true;
+
+   public static final JournalType DEFAULT_JOURNAL_TYPE = JournalType.ASYNCIO;
+
+   public static final boolean DEFAULT_JOURNAL_SYNC_TRANSACTIONAL = true;
+
+   public static final boolean DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL = true;
+
+   public static final int DEFAULT_JOURNAL_FILE_SIZE = 10485760;
+
+   public static final int DEFAULT_JOURNAL_COMPACT_MIN_FILES = 10;
+
+   public static final int DEFAULT_JOURNAL_COMPACT_PERCENTAGE = 30;
+
+   public static final int DEFAULT_JOURNAL_MIN_FILES = 2;
+
+   // AIO and NIO need to have different defaults for some values
+
+   public static final int DEFAULT_JOURNAL_MAX_IO_AIO = 500;
+
+   public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO = (int)(1000000000d / 2000);
+
+   public static final int DEFAULT_JOURNAL_BUFFER_SIZE_AIO = 490 * 1024;
+
+   public static final int DEFAULT_JOURNAL_MAX_IO_NIO = 1;
+
+   public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = (int)(1000000000d / 300);
+
+   public static final int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = 490 * 1024;
+
+   public static final boolean DEFAULT_JOURNAL_LOG_WRITE_RATE = false;
+
+   public static final int DEFAULT_JOURNAL_PERF_BLAST_PAGES = -1;
+
+   public static final boolean DEFAULT_RUN_SYNC_SPEED_TEST = false;
+
+   public static final boolean DEFAULT_WILDCARD_ROUTING_ENABLED = true;
+
+   public static final boolean DEFAULT_MESSAGE_COUNTER_ENABLED = false;
+
+   public static final long DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD = 10000;
+
+   public static final int DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY = 10;
+
+   public static final long DEFAULT_TRANSACTION_TIMEOUT = 300000; // 5 minutes
+
+   public static final long DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD = 1000;
+
+   public static final SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("hornetq.management");
+
+   public static final SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("hornetq.notifications");
+
+   public static final String DEFAULT_MANAGEMENT_CLUSTER_USER = "HORNETQ.MANAGEMENT.ADMIN.USER";
+
+   public static final String DEFAULT_MANAGEMENT_CLUSTER_PASSWORD = "CHANGE ME!!";
+
+   public static final long DEFAULT_BROADCAST_PERIOD = 1000;
+
+   public static final long DEFAULT_BROADCAST_REFRESH_TIMEOUT = 10000;
+
+   public static final long DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD = 30000;
+
+   public static final int DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY = 3;
+
+   public static final int DEFAULT_ID_CACHE_SIZE = 2000;
+
+   public static final boolean DEFAULT_PERSIST_ID_CACHE = true;
+
+   public static final boolean DEFAULT_CLUSTER_DUPLICATE_DETECTION = true;
+
+   public static final boolean DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS = false;
+
+   public static final int DEFAULT_CLUSTER_MAX_HOPS = 1;
+
+   public static final long DEFAULT_CLUSTER_RETRY_INTERVAL = 500;
+
+   public static final boolean DEFAULT_DIVERT_EXCLUSIVE = false;
+
+   public static final boolean DEFAULT_BRIDGE_DUPLICATE_DETECTION = true;
+
+   public static final int DEFAULT_BRIDGE_RECONNECT_ATTEMPTS = -1;
+
+   public static final long DEFAULT_SERVER_DUMP_INTERVAL = -1;
+
+   public static final int DEFAULT_MEMORY_WARNING_THRESHOLD = 25;
+
+   public static final long DEFAULT_MEMORY_MEASURE_INTERVAL = -1; // in milliseconds
+
+   public static final String DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME = JULLogDelegateFactory.class.getCanonicalName();
+
+   // Attributes -----------------------------------------------------------------------------
+
+   protected boolean clustered = ConfigurationImpl.DEFAULT_CLUSTERED;
+
+   protected boolean backup = ConfigurationImpl.DEFAULT_BACKUP;
+
+   protected boolean sharedStore = ConfigurationImpl.DEFAULT_SHARED_STORE;
+
+   protected boolean fileDeploymentEnabled = ConfigurationImpl.DEFAULT_FILE_DEPLOYMENT_ENABLED;
+
+   protected boolean persistenceEnabled = ConfigurationImpl.DEFAULT_PERSISTENCE_ENABLED;
+
+   protected long fileDeploymentScanPeriod = ConfigurationImpl.DEFAULT_FILE_DEPLOYER_SCAN_PERIOD;
+
+   protected boolean persistDeliveryCountBeforeDelivery = ConfigurationImpl.DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY;
+
+   protected int scheduledThreadPoolMaxSize = ConfigurationImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
+
+   protected int threadPoolMaxSize = ConfigurationImpl.DEFAULT_THREAD_POOL_MAX_SIZE;
+
+   protected long securityInvalidationInterval = ConfigurationImpl.DEFAULT_SECURITY_INVALIDATION_INTERVAL;
+
+   protected boolean securityEnabled = ConfigurationImpl.DEFAULT_SECURITY_ENABLED;
+
+   protected boolean jmxManagementEnabled = ConfigurationImpl.DEFAULT_JMX_MANAGEMENT_ENABLED;
+
+   protected String jmxDomain = ConfigurationImpl.DEFAULT_JMX_DOMAIN;
+
+   protected long connectionTTLOverride = ConfigurationImpl.DEFAULT_CONNECTION_TTL_OVERRIDE;
+
+   protected boolean asyncConnectionExecutionEnabled = ConfigurationImpl.DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED;
+
+   protected long messageExpiryScanPeriod = ConfigurationImpl.DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD;
+
+   protected int messageExpiryThreadPriority = ConfigurationImpl.DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY;
+
+   protected int idCacheSize = ConfigurationImpl.DEFAULT_ID_CACHE_SIZE;
+
+   protected boolean persistIDCache = ConfigurationImpl.DEFAULT_PERSIST_ID_CACHE;
+
+   protected String logDelegateFactoryClassName = ConfigurationImpl.DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME;
+
+   protected List<String> interceptorClassNames = new ArrayList<String>();
+
+   protected Map<String, TransportConfiguration> connectorConfigs = new HashMap<String, TransportConfiguration>();
+
+   protected Set<TransportConfiguration> acceptorConfigs = new HashSet<TransportConfiguration>();
+
+   protected String backupConnectorName;
+
+   protected List<BridgeConfiguration> bridgeConfigurations = new ArrayList<BridgeConfiguration>();
+
+   protected List<DivertConfiguration> divertConfigurations = new ArrayList<DivertConfiguration>();
+
+   protected List<ClusterConnectionConfiguration> clusterConfigurations = new ArrayList<ClusterConnectionConfiguration>();
+
+   protected List<QueueConfiguration> queueConfigurations = new ArrayList<QueueConfiguration>();
+
+   protected List<BroadcastGroupConfiguration> broadcastGroupConfigurations = new ArrayList<BroadcastGroupConfiguration>();
+
+   protected Map<String, DiscoveryGroupConfiguration> discoveryGroupConfigurations = new LinkedHashMap<String, DiscoveryGroupConfiguration>();
+
+   // Paging related attributes ------------------------------------------------------------
+
+   protected String pagingDirectory = ConfigurationImpl.DEFAULT_PAGING_DIR;
+
+   // File related attributes -----------------------------------------------------------
+
+   protected String largeMessagesDirectory = ConfigurationImpl.DEFAULT_LARGE_MESSAGES_DIR;
+
+   protected String bindingsDirectory = ConfigurationImpl.DEFAULT_BINDINGS_DIRECTORY;
+
+   protected boolean createBindingsDir = ConfigurationImpl.DEFAULT_CREATE_BINDINGS_DIR;
+
+   protected String journalDirectory = ConfigurationImpl.DEFAULT_JOURNAL_DIR;
+
+   protected boolean createJournalDir = ConfigurationImpl.DEFAULT_CREATE_JOURNAL_DIR;
+
+   public JournalType journalType = ConfigurationImpl.DEFAULT_JOURNAL_TYPE;
+
+   protected boolean journalSyncTransactional = ConfigurationImpl.DEFAULT_JOURNAL_SYNC_TRANSACTIONAL;
+
+   protected boolean journalSyncNonTransactional = ConfigurationImpl.DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL;
+
+   protected int journalCompactMinFiles = ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_MIN_FILES;
+
+   protected int journalCompactPercentage = ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_PERCENTAGE;
+
+   protected int journalFileSize = ConfigurationImpl.DEFAULT_JOURNAL_FILE_SIZE;
+
+   protected int journalMinFiles = ConfigurationImpl.DEFAULT_JOURNAL_MIN_FILES;
+
+   // AIO and NIO need different values for these attributes
+
+   protected int journalMaxIO_AIO = ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO;
+
+   protected int journalBufferTimeout_AIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO;
+
+   protected int journalBufferSize_AIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO;
+
+   protected int journalMaxIO_NIO = ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO;
+
+   protected int journalBufferTimeout_NIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO;
+
+   protected int journalBufferSize_NIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO;
+
+   protected boolean logJournalWriteRate = ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE;
+
+   protected int journalPerfBlastPages = ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES;
+
+   protected boolean runSyncSpeedTest = ConfigurationImpl.DEFAULT_RUN_SYNC_SPEED_TEST;
+
+   protected boolean wildcardRoutingEnabled = ConfigurationImpl.DEFAULT_WILDCARD_ROUTING_ENABLED;
+
+   protected boolean messageCounterEnabled = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_ENABLED;
+
+   protected long messageCounterSamplePeriod = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD;
+
+   protected int messageCounterMaxDayHistory = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY;
+
+   protected long transactionTimeout = ConfigurationImpl.DEFAULT_TRANSACTION_TIMEOUT;
+
+   protected long transactionTimeoutScanPeriod = ConfigurationImpl.DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD;
+
+   protected SimpleString managementAddress = ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS;
+
+   protected SimpleString managementNotificationAddress = ConfigurationImpl.DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS;
+
+   protected String managementClusterUser = ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER;
+
+   protected String managementClusterPassword = ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD;
+
+   protected long serverDumpInterval = ConfigurationImpl.DEFAULT_SERVER_DUMP_INTERVAL;
+
+   // percentage of free memory which triggers warning from the memory manager
+   protected int memoryWarningThreshold = ConfigurationImpl.DEFAULT_MEMORY_WARNING_THRESHOLD;
+
+   protected long memoryMeasureInterval = ConfigurationImpl.DEFAULT_MEMORY_MEASURE_INTERVAL;
+
+   protected GroupingHandlerConfiguration groupingHandlerConfiguration;
+
+   // Public -------------------------------------------------------------------------
+
+   public boolean isClustered()
+   {
+      return clustered;
+   }
+
+   public void setClustered(final boolean clustered)
+   {
+      this.clustered = clustered;
+   }
+
+   public boolean isBackup()
+   {
+      return backup;
+   }
+
+   public boolean isFileDeploymentEnabled()
+   {
+      return fileDeploymentEnabled;
+   }
+
+   public void setFileDeploymentEnabled(final boolean enable)
+   {
+      fileDeploymentEnabled = enable;
+   }
+
+   public boolean isPersistenceEnabled()
+   {
+      return persistenceEnabled;
+   }
+
+   public void setPersistenceEnabled(final boolean enable)
+   {
+      persistenceEnabled = enable;
+   }
+
+   public long getFileDeployerScanPeriod()
+   {
+      return fileDeploymentScanPeriod;
+   }
+
+   public void setFileDeployerScanPeriod(final long period)
+   {
+      fileDeploymentScanPeriod = period;
+   }
+
+   /**
+    * @return the persistDeliveryCountBeforeDelivery
+    */
+   public boolean isPersistDeliveryCountBeforeDelivery()
+   {
+      return persistDeliveryCountBeforeDelivery;
+   }
+
+   public void setPersistDeliveryCountBeforeDelivery(final boolean persistDeliveryCountBeforeDelivery)
+   {
+      this.persistDeliveryCountBeforeDelivery = persistDeliveryCountBeforeDelivery;
+   }
+
+   public void setBackup(final boolean backup)
+   {
+      this.backup = backup;
+   }
+
+   public boolean isSharedStore()
+   {
+      return sharedStore;
+   }
+
+   public void setSharedStore(final boolean sharedStore)
+   {
+      this.sharedStore = sharedStore;
+   }
+
+   public int getScheduledThreadPoolMaxSize()
+   {
+      return scheduledThreadPoolMaxSize;
+   }
+
+   public void setScheduledThreadPoolMaxSize(final int maxSize)
+   {
+      scheduledThreadPoolMaxSize = maxSize;
+   }
+
+   public int getThreadPoolMaxSize()
+   {
+      return threadPoolMaxSize;
+   }
+
+   public void setThreadPoolMaxSize(final int maxSize)
+   {
+      threadPoolMaxSize = maxSize;
+   }
+
+   public long getSecurityInvalidationInterval()
+   {
+      return securityInvalidationInterval;
+   }
+
+   public void setSecurityInvalidationInterval(final long interval)
+   {
+      securityInvalidationInterval = interval;
+   }
+
+   public long getConnectionTTLOverride()
+   {
+      return connectionTTLOverride;
+   }
+
+   public void setConnectionTTLOverride(final long ttl)
+   {
+      connectionTTLOverride = ttl;
+   }
+
+   public boolean isAsyncConnectionExecutionEnabled()
+   {
+      return asyncConnectionExecutionEnabled;
+   }
+
+   public void setEnabledAsyncConnectionExecution(final boolean enabled)
+   {
+      asyncConnectionExecutionEnabled = enabled;
+   }
+
+   public List<String> getInterceptorClassNames()
+   {
+      return interceptorClassNames;
+   }
+
+   public void setInterceptorClassNames(final List<String> interceptors)
+   {
+      interceptorClassNames = interceptors;
+   }
+
+   public Set<TransportConfiguration> getAcceptorConfigurations()
+   {
+      return acceptorConfigs;
+   }
+
+   public void setAcceptorConfigurations(final Set<TransportConfiguration> infos)
+   {
+      acceptorConfigs = infos;
+   }
+
+   public Map<String, TransportConfiguration> getConnectorConfigurations()
+   {
+      return connectorConfigs;
+   }
+
+   public void setConnectorConfigurations(final Map<String, TransportConfiguration> infos)
+   {
+      connectorConfigs = infos;
+   }
+
+   public String getBackupConnectorName()
+   {
+      return backupConnectorName;
+   }
+
+   public void setBackupConnectorName(final String backupConnectorName)
+   {
+      this.backupConnectorName = backupConnectorName;
+   }
+
+   public GroupingHandlerConfiguration getGroupingHandlerConfiguration()
+   {
+      return groupingHandlerConfiguration;
+   }
+
+   public void setGroupingHandlerConfiguration(final GroupingHandlerConfiguration groupingHandlerConfiguration)
+   {
+      this.groupingHandlerConfiguration = groupingHandlerConfiguration;
+   }
+
+   public List<BridgeConfiguration> getBridgeConfigurations()
+   {
+      return bridgeConfigurations;
+   }
+
+   public void setBridgeConfigurations(final List<BridgeConfiguration> configs)
+   {
+      bridgeConfigurations = configs;
+   }
+
+   public List<BroadcastGroupConfiguration> getBroadcastGroupConfigurations()
+   {
+      return broadcastGroupConfigurations;
+   }
+
+   public void setBroadcastGroupConfigurations(final List<BroadcastGroupConfiguration> configs)
+   {
+      broadcastGroupConfigurations = configs;
+   }
+
+   public List<ClusterConnectionConfiguration> getClusterConfigurations()
+   {
+      return clusterConfigurations;
+   }
+
+   public void setClusterConfigurations(final List<ClusterConnectionConfiguration> configs)
+   {
+      clusterConfigurations = configs;
+   }
+
+   public List<DivertConfiguration> getDivertConfigurations()
+   {
+      return divertConfigurations;
+   }
+
+   public void setDivertConfigurations(final List<DivertConfiguration> configs)
+   {
+      divertConfigurations = configs;
+   }
+
+   public List<QueueConfiguration> getQueueConfigurations()
+   {
+      return queueConfigurations;
+   }
+
+   public void setQueueConfigurations(final List<QueueConfiguration> configs)
+   {
+      queueConfigurations = configs;
+   }
+
+   public Map<String, DiscoveryGroupConfiguration> getDiscoveryGroupConfigurations()
+   {
+      return discoveryGroupConfigurations;
+   }
+
+   public void setDiscoveryGroupConfigurations(final Map<String, DiscoveryGroupConfiguration> discoveryGroupConfigurations)
+   {
+      this.discoveryGroupConfigurations = discoveryGroupConfigurations;
+   }
+
+   public int getIDCacheSize()
+   {
+      return idCacheSize;
+   }
+
+   public void setIDCacheSize(final int idCacheSize)
+   {
+      this.idCacheSize = idCacheSize;
+   }
+
+   public boolean isPersistIDCache()
+   {
+      return persistIDCache;
+   }
+
+   public void setPersistIDCache(final boolean persist)
+   {
+      persistIDCache = persist;
+   }
+
+   public String getBindingsDirectory()
+   {
+      return bindingsDirectory;
+   }
+
+   public void setBindingsDirectory(final String dir)
+   {
+      bindingsDirectory = dir;
+   }
+
+   public String getJournalDirectory()
+   {
+      return journalDirectory;
+   }
+
+   public void setJournalDirectory(final String dir)
+   {
+      journalDirectory = dir;
+   }
+
+   public JournalType getJournalType()
+   {
+      return journalType;
+   }
+
+   public void setPagingDirectory(final String dir)
+   {
+      pagingDirectory = dir;
+   }
+
+   public String getPagingDirectory()
+   {
+      return pagingDirectory;
+   }
+
+   public void setJournalType(final JournalType type)
+   {
+      journalType = type;
+   }
+
+   public boolean isJournalSyncTransactional()
+   {
+      return journalSyncTransactional;
+   }
+
+   public void setJournalSyncTransactional(final boolean sync)
+   {
+      journalSyncTransactional = sync;
+   }
+
+   public boolean isJournalSyncNonTransactional()
+   {
+      return journalSyncNonTransactional;
+   }
+
+   public void setJournalSyncNonTransactional(final boolean sync)
+   {
+      journalSyncNonTransactional = sync;
+   }
+
+   public int getJournalFileSize()
+   {
+      return journalFileSize;
+   }
+
+   public void setJournalFileSize(final int size)
+   {
+      journalFileSize = size;
+   }
+
+   public int getJournalMinFiles()
+   {
+      return journalMinFiles;
+   }
+
+   public void setJournalMinFiles(final int files)
+   {
+      journalMinFiles = files;
+   }
+
+   public boolean isLogJournalWriteRate()
+   {
+      return logJournalWriteRate;
+   }
+
+   public void setLogJournalWriteRate(final boolean logJournalWriteRate)
+   {
+      this.logJournalWriteRate = logJournalWriteRate;
+   }
+
+   public int getJournalPerfBlastPages()
+   {
+      return journalPerfBlastPages;
+   }
+
+   public void setJournalPerfBlastPages(final int journalPerfBlastPages)
+   {
+      this.journalPerfBlastPages = journalPerfBlastPages;
+   }
+
+   public boolean isRunSyncSpeedTest()
+   {
+      return runSyncSpeedTest;
+   }
+
+   public void setRunSyncSpeedTest(final boolean run)
+   {
+      runSyncSpeedTest = run;
+   }
+
+   public boolean isCreateBindingsDir()
+   {
+      return createBindingsDir;
+   }
+
+   public void setCreateBindingsDir(final boolean create)
+   {
+      createBindingsDir = create;
+   }
+
+   public boolean isCreateJournalDir()
+   {
+      return createJournalDir;
+   }
+
+   public void setCreateJournalDir(final boolean create)
+   {
+      createJournalDir = create;
+   }
+
+   public boolean isWildcardRoutingEnabled()
+   {
+      return wildcardRoutingEnabled;
+   }
+
+   public void setWildcardRoutingEnabled(final boolean enabled)
+   {
+      wildcardRoutingEnabled = enabled;
+   }
+
+   public long getTransactionTimeout()
+   {
+      return transactionTimeout;
+   }
+
+   public void setTransactionTimeout(final long timeout)
+   {
+      transactionTimeout = timeout;
+   }
+
+   public long getTransactionTimeoutScanPeriod()
+   {
+      return transactionTimeoutScanPeriod;
+   }
+
+   public void setTransactionTimeoutScanPeriod(final long period)
+   {
+      transactionTimeoutScanPeriod = period;
+   }
+
+   public long getMessageExpiryScanPeriod()
+   {
+      return messageExpiryScanPeriod;
+   }
+
+   public void setMessageExpiryScanPeriod(final long messageExpiryScanPeriod)
+   {
+      this.messageExpiryScanPeriod = messageExpiryScanPeriod;
+   }
+
+   public int getMessageExpiryThreadPriority()
+   {
+      return messageExpiryThreadPriority;
+   }
+
+   public void setMessageExpiryThreadPriority(final int messageExpiryThreadPriority)
+   {
+      this.messageExpiryThreadPriority = messageExpiryThreadPriority;
+   }
+
+   public boolean isSecurityEnabled()
+   {
+      return securityEnabled;
+   }
+
+   public void setSecurityEnabled(final boolean enabled)
+   {
+      securityEnabled = enabled;
+   }
+
+   public boolean isJMXManagementEnabled()
+   {
+      return jmxManagementEnabled;
+   }
+
+   public void setJMXManagementEnabled(final boolean enabled)
+   {
+      jmxManagementEnabled = enabled;
+   }
+
+   public String getJMXDomain()
+   {
+      return jmxDomain;
+   }
+
+   public void setJMXDomain(final String domain)
+   {
+      jmxDomain = domain;
+   }
+
+   public String getLargeMessagesDirectory()
+   {
+      return largeMessagesDirectory;
+   }
+
+   public void setLargeMessagesDirectory(final String directory)
+   {
+      largeMessagesDirectory = directory;
+   }
+
+   public boolean isMessageCounterEnabled()
+   {
+      return messageCounterEnabled;
+   }
+
+   public void setMessageCounterEnabled(final boolean enabled)
+   {
+      messageCounterEnabled = enabled;
+   }
+
+   public long getMessageCounterSamplePeriod()
+   {
+      return messageCounterSamplePeriod;
+   }
+   
+   public void setMessageCounterSamplePeriod(long period)
+   {
+      this.messageCounterSamplePeriod = period;
+   }
+
+   public int getMessageCounterMaxDayHistory()
+   {
+      return messageCounterMaxDayHistory;
+   }
+
+   public void setMessageCounterMaxDayHistory(final int maxDayHistory)
+   {
+      messageCounterMaxDayHistory = maxDayHistory;
+   }
+
+   public SimpleString getManagementAddress()
+   {
+      return managementAddress;
+   }
+
+   public void setManagementAddress(final SimpleString address)
+   {
+      managementAddress = address;
+   }
+
+   public SimpleString getManagementNotificationAddress()
+   {
+      return managementNotificationAddress;
+   }
+
+   public void setManagementNotificationAddress(final SimpleString address)
+   {
+      managementNotificationAddress = address;
+   }
+
+   public String getManagementClusterUser()
+   {
+      return managementClusterUser;
+   }
+
+   public void setManagementClusterUser(final String user)
+   {
+      managementClusterUser = user;
+   }
+
+   public String getManagementClusterPassword()
+   {
+      return managementClusterPassword;
+   }
+
+   public void setManagementClusterPassword(final String clusterPassword)
+   {
+      managementClusterPassword = clusterPassword;
+   }
+
+   public int getJournalCompactMinFiles()
+   {
+      return journalCompactMinFiles;
+   }
+
+   public int getJournalCompactPercentage()
+   {
+      return journalCompactPercentage;
+   }
+
+   public void setJournalCompactMinFiles(final int minFiles)
+   {
+      journalCompactMinFiles = minFiles;
+   }
+
+   public void setJournalCompactPercentage(final int percentage)
+   {
+      journalCompactPercentage = percentage;
+   }
+
+   public long getServerDumpInterval()
+   {
+      return serverDumpInterval;
+   }
+
+   public void setServerDumpInterval(final long intervalInMilliseconds)
+   {
+      serverDumpInterval = intervalInMilliseconds;
+   }
+
+   public int getMemoryWarningThreshold()
+   {
+      return memoryWarningThreshold;
+   }
+
+   public void setMemoryWarningThreshold(final int memoryWarningThreshold)
+   {
+      this.memoryWarningThreshold = memoryWarningThreshold;
+   }
+
+   public long getMemoryMeasureInterval()
+   {
+      return memoryMeasureInterval;
+   }
+
+   public void setMemoryMeasureInterval(final long memoryMeasureInterval)
+   {
+      this.memoryMeasureInterval = memoryMeasureInterval;
+   }
+
+   public String getLogDelegateFactoryClassName()
+   {
+      return logDelegateFactoryClassName;
+   }
+
+   public void setLogDelegateFactoryClassName(final String className)
+   {
+      logDelegateFactoryClassName = className;
+   }
+
+   public int getJournalMaxIO_AIO()
+   {
+      return journalMaxIO_AIO;
+   }
+
+   public void setJournalMaxIO_AIO(final int journalMaxIO)
+   {
+      journalMaxIO_AIO = journalMaxIO;
+   }
+
+   public int getJournalBufferTimeout_AIO()
+   {
+      return journalBufferTimeout_AIO;
+   }
+
+   public void setJournalBufferTimeout_AIO(final int journalBufferTimeout)
+   {
+      journalBufferTimeout_AIO = journalBufferTimeout;
+   }
+
+   public int getJournalBufferSize_AIO()
+   {
+      return journalBufferSize_AIO;
+   }
+
+   public void setJournalBufferSize_AIO(final int journalBufferSize)
+   {
+      journalBufferSize_AIO = journalBufferSize;
+   }
+
+   public int getJournalMaxIO_NIO()
+   {
+      return journalMaxIO_NIO;
+   }
+
+   public void setJournalMaxIO_NIO(final int journalMaxIO)
+   {
+      journalMaxIO_NIO = journalMaxIO;
+   }
+
+   public int getJournalBufferTimeout_NIO()
+   {
+      return journalBufferTimeout_NIO;
+   }
+
+   public void setJournalBufferTimeout_NIO(final int journalBufferTimeout)
+   {
+      journalBufferTimeout_NIO = journalBufferTimeout;
+   }
+
+   public int getJournalBufferSize_NIO()
+   {
+      return journalBufferSize_NIO;
+   }
+
+   public void setJournalBufferSize_NIO(final int journalBufferSize)
+   {
+      journalBufferSize_NIO = journalBufferSize;
+   }
+
+   @Override
+   public boolean equals(final Object obj)
+   {
+      if (this == obj)
+      {
+         return true;
+      }
+      if (obj == null)
+      {
+         return false;
+      }
+      if (getClass() != obj.getClass())
+      {
+         return false;
+      }
+      ConfigurationImpl other = (ConfigurationImpl)obj;
+      if (asyncConnectionExecutionEnabled != other.asyncConnectionExecutionEnabled)
+      {
+         return false;
+      }
+      if (backup != other.backup)
+      {
+         return false;
+      }
+      if (sharedStore != other.sharedStore)
+      {
+         return false;
+      }
+      if (backupConnectorName == null)
+      {
+         if (other.backupConnectorName != null)
+         {
+            return false;
+         }
+      }
+      else if (!backupConnectorName.equals(other.backupConnectorName))
+      {
+         return false;
+      }
+      if (bindingsDirectory == null)
+      {
+         if (other.bindingsDirectory != null)
+         {
+            return false;
+         }
+      }
+      else if (!bindingsDirectory.equals(other.bindingsDirectory))
+      {
+         return false;
+      }
+
+      if (clustered != other.clustered)
+      {
+         return false;
+      }
+      if (connectionTTLOverride != other.connectionTTLOverride)
+      {
+         return false;
+      }
+      if (createBindingsDir != other.createBindingsDir)
+      {
+         return false;
+      }
+      if (createJournalDir != other.createJournalDir)
+      {
+         return false;
+      }
+
+      if (fileDeploymentEnabled != other.fileDeploymentEnabled)
+      {
+         return false;
+      }
+      if (fileDeploymentScanPeriod != other.fileDeploymentScanPeriod)
+      {
+         return false;
+      }
+      if (idCacheSize != other.idCacheSize)
+      {
+         return false;
+      }
+      if (jmxManagementEnabled != other.jmxManagementEnabled)
+      {
+         return false;
+      }
+      if (journalBufferSize_AIO != other.journalBufferSize_AIO)
+      {
+         return false;
+      }
+      if (journalBufferTimeout_AIO != other.journalBufferTimeout_AIO)
+      {
+         return false;
+      }
+      if (journalMaxIO_AIO != other.journalMaxIO_AIO)
+      {
+         return false;
+      }
+      if (journalBufferSize_NIO != other.journalBufferSize_NIO)
+      {
+         return false;
+      }
+      if (journalBufferTimeout_NIO != other.journalBufferTimeout_NIO)
+      {
+         return false;
+      }
+      if (journalMaxIO_NIO != other.journalMaxIO_NIO)
+      {
+         return false;
+      }
+      if (journalCompactMinFiles != other.journalCompactMinFiles)
+      {
+         return false;
+      }
+      if (journalCompactPercentage != other.journalCompactPercentage)
+      {
+         return false;
+      }
+      if (journalDirectory == null)
+      {
+         if (other.journalDirectory != null)
+         {
+            return false;
+         }
+      }
+      else if (!journalDirectory.equals(other.journalDirectory))
+      {
+         return false;
+      }
+      if (journalFileSize != other.journalFileSize)
+      {
+         return false;
+      }
+
+      if (journalMinFiles != other.journalMinFiles)
+      {
+         return false;
+      }
+      if (journalPerfBlastPages != other.journalPerfBlastPages)
+      {
+         return false;
+      }
+      if (journalSyncNonTransactional != other.journalSyncNonTransactional)
+      {
+         return false;
+      }
+      if (journalSyncTransactional != other.journalSyncTransactional)
+      {
+         return false;
+      }
+      if (journalType == null)
+      {
+         if (other.journalType != null)
+         {
+            return false;
+         }
+      }
+      else if (!journalType.equals(other.journalType))
+      {
+         return false;
+      }
+      if (largeMessagesDirectory == null)
+      {
+         if (other.largeMessagesDirectory != null)
+         {
+            return false;
+         }
+      }
+      else if (!largeMessagesDirectory.equals(other.largeMessagesDirectory))
+      {
+         return false;
+      }
+      if (logJournalWriteRate != other.logJournalWriteRate)
+      {
+         return false;
+      }
+      if (managementAddress == null)
+      {
+         if (other.managementAddress != null)
+         {
+            return false;
+         }
+      }
+      else if (!managementAddress.equals(other.managementAddress))
+      {
+         return false;
+      }
+      if (managementClusterPassword == null)
+      {
+         if (other.managementClusterPassword != null)
+         {
+            return false;
+         }
+      }
+      else if (!managementClusterPassword.equals(other.managementClusterPassword))
+      {
+         return false;
+      }
+      if (managementClusterUser == null)
+      {
+         if (other.managementClusterUser != null)
+         {
+            return false;
+         }
+      }
+      else if (!managementClusterUser.equals(other.managementClusterUser))
+      {
+         return false;
+      }
+      if (managementNotificationAddress == null)
+      {
+         if (other.managementNotificationAddress != null)
+         {
+            return false;
+         }
+      }
+      else if (!managementNotificationAddress.equals(other.managementNotificationAddress))
+      {
+         return false;
+      }
+      if (messageCounterEnabled != other.messageCounterEnabled)
+      {
+         return false;
+      }
+      if (messageCounterMaxDayHistory != other.messageCounterMaxDayHistory)
+      {
+         return false;
+      }
+      if (messageCounterSamplePeriod != other.messageCounterSamplePeriod)
+      {
+         return false;
+      }
+      if (messageExpiryScanPeriod != other.messageExpiryScanPeriod)
+      {
+         return false;
+      }
+      if (messageExpiryThreadPriority != other.messageExpiryThreadPriority)
+      {
+         return false;
+      }
+      if (pagingDirectory == null)
+      {
+         if (other.pagingDirectory != null)
+         {
+            return false;
+         }
+      }
+      else if (!pagingDirectory.equals(other.pagingDirectory))
+      {
+         return false;
+      }
+      if (persistDeliveryCountBeforeDelivery != other.persistDeliveryCountBeforeDelivery)
+      {
+         return false;
+      }
+      if (persistIDCache != other.persistIDCache)
+      {
+         return false;
+      }
+      if (persistenceEnabled != other.persistenceEnabled)
+      {
+         return false;
+      }
+      if (scheduledThreadPoolMaxSize != other.scheduledThreadPoolMaxSize)
+      {
+         return false;
+      }
+      if (securityEnabled != other.securityEnabled)
+      {
+         return false;
+      }
+      if (securityInvalidationInterval != other.securityInvalidationInterval)
+      {
+         return false;
+      }
+      if (serverDumpInterval != other.serverDumpInterval)
+      {
+         return false;
+      }
+      if (threadPoolMaxSize != other.threadPoolMaxSize)
+      {
+         return false;
+      }
+      if (transactionTimeout != other.transactionTimeout)
+      {
+         return false;
+      }
+      if (transactionTimeoutScanPeriod != other.transactionTimeoutScanPeriod)
+      {
+         return false;
+      }
+      if (wildcardRoutingEnabled != other.wildcardRoutingEnabled)
+      {
+         return false;
+      }
+      return true;
+   }
+
+}

Copied: trunk/src/main/org/hornetq/core/config/FileConfiguration.java (from rev 8707, trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/FileConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/FileConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,847 @@
+/*
+ * 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.core.config;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hornetq.Pair;
+import org.hornetq.SimpleString;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.cluster.BridgeConfiguration;
+import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
+import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
+import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
+import org.hornetq.core.config.cluster.DivertConfiguration;
+import org.hornetq.core.config.impl.Validators;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.server.JournalType;
+import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
+import org.hornetq.utils.XMLConfigurationUtil;
+import org.hornetq.utils.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * ConfigurationImpl
+ * This class allows the Configuration class to be configured via a config file.
+ *
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ * @author <a href="tim.fox at jboss.com">Tim Fox</a>
+ */
+public class FileConfiguration extends ConfigurationImpl
+{
+   private static final long serialVersionUID = -4766689627675039596L;
+
+   private static final Logger log = Logger.getLogger(FileConfiguration.class);
+
+   // Constants ------------------------------------------------------------------------
+
+   private static final String DEFAULT_CONFIGURATION_URL = "hornetq-configuration.xml";
+
+   private static final String CONFIGURATION_SCHEMA_URL = "schema/hornetq-configuration.xsd";
+
+   // For a bridge confirmations must be activated or send acknowledgements won't return
+
+   public static final int DEFAULT_CONFIRMATION_WINDOW_SIZE = 1024 * 1024;
+
+   // Static --------------------------------------------------------------------------
+
+   // Attributes ----------------------------------------------------------------------
+
+   private String configurationUrl = FileConfiguration.DEFAULT_CONFIGURATION_URL;
+
+   private boolean started;
+
+   // Public -------------------------------------------------------------------------
+
+   public synchronized void start() throws Exception
+   {
+      if (started)
+      {
+         return;
+      }
+
+      URL url = getClass().getClassLoader().getResource(configurationUrl);
+      FileConfiguration.log.debug("Loading server configuration from " + url);
+
+      Reader reader = new InputStreamReader(url.openStream());
+      String xml = org.hornetq.utils.XMLUtil.readerToString(reader);
+      xml = XMLUtil.replaceSystemProps(xml);
+      Element e = org.hornetq.utils.XMLUtil.stringToElement(xml);
+      org.hornetq.utils.XMLUtil.validate(e, FileConfiguration.CONFIGURATION_SCHEMA_URL);
+
+      clustered = XMLConfigurationUtil.getBoolean(e, "clustered", clustered);
+
+      backup = XMLConfigurationUtil.getBoolean(e, "backup", backup);
+
+      sharedStore = XMLConfigurationUtil.getBoolean(e, "shared-store", sharedStore);
+
+      // Defaults to true when using FileConfiguration
+      fileDeploymentEnabled = XMLConfigurationUtil.getBoolean(e, "file-deployment-enabled", true);
+
+      persistenceEnabled = XMLConfigurationUtil.getBoolean(e, "persistence-enabled", persistenceEnabled);
+
+      persistDeliveryCountBeforeDelivery = XMLConfigurationUtil.getBoolean(e,
+                                                                           "persist-delivery-count-before-delivery",
+                                                                           persistDeliveryCountBeforeDelivery);
+
+      // NOTE! All the defaults come from the super class
+
+      scheduledThreadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
+                                                                   "scheduled-thread-pool-max-size",
+                                                                   scheduledThreadPoolMaxSize,
+                                                                   Validators.GT_ZERO);
+
+      threadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
+                                                          "thread-pool-max-size",
+                                                          threadPoolMaxSize,
+                                                          Validators.MINUS_ONE_OR_GT_ZERO);
+
+      securityEnabled = XMLConfigurationUtil.getBoolean(e, "security-enabled", securityEnabled);
+
+      jmxManagementEnabled = XMLConfigurationUtil.getBoolean(e, "jmx-management-enabled", jmxManagementEnabled);
+
+      jmxDomain = XMLConfigurationUtil.getString(e, "jmx-domain", jmxDomain, Validators.NOT_NULL_OR_EMPTY);
+
+      securityInvalidationInterval = XMLConfigurationUtil.getLong(e,
+                                                                  "security-invalidation-interval",
+                                                                  securityInvalidationInterval,
+                                                                  Validators.GT_ZERO);
+
+      connectionTTLOverride = XMLConfigurationUtil.getLong(e,
+                                                           "connection-ttl-override",
+                                                           connectionTTLOverride,
+                                                           Validators.MINUS_ONE_OR_GT_ZERO);
+
+      asyncConnectionExecutionEnabled = XMLConfigurationUtil.getBoolean(e,
+                                                                        "async-connection-execution-enabled",
+                                                                        asyncConnectionExecutionEnabled);
+
+      transactionTimeout = XMLConfigurationUtil.getLong(e,
+                                                        "transaction-timeout",
+                                                        transactionTimeout,
+                                                        Validators.GT_ZERO);
+
+      transactionTimeoutScanPeriod = XMLConfigurationUtil.getLong(e,
+                                                                  "transaction-timeout-scan-period",
+                                                                  transactionTimeoutScanPeriod,
+                                                                  Validators.GT_ZERO);
+
+      messageExpiryScanPeriod = XMLConfigurationUtil.getLong(e,
+                                                             "message-expiry-scan-period",
+                                                             messageExpiryScanPeriod,
+                                                             Validators.GT_ZERO);
+
+      messageExpiryThreadPriority = XMLConfigurationUtil.getInteger(e,
+                                                                    "message-expiry-thread-priority",
+                                                                    messageExpiryThreadPriority,
+                                                                    Validators.THREAD_PRIORITY_RANGE);
+
+      idCacheSize = XMLConfigurationUtil.getInteger(e, "id-cache-size", idCacheSize, Validators.GT_ZERO);
+
+      persistIDCache = XMLConfigurationUtil.getBoolean(e, "persist-id-cache", persistIDCache);
+
+      managementAddress = new SimpleString(XMLConfigurationUtil.getString(e,
+                                                                          "management-address",
+                                                                          managementAddress.toString(),
+                                                                          Validators.NOT_NULL_OR_EMPTY));
+
+      managementNotificationAddress = new SimpleString(XMLConfigurationUtil.getString(e,
+                                                                                      "management-notification-address",
+                                                                                      managementNotificationAddress.toString(),
+                                                                                      Validators.NOT_NULL_OR_EMPTY));
+
+      managementClusterPassword = XMLConfigurationUtil.getString(e,
+                                                                 "management-cluster-password",
+                                                                 managementClusterPassword,
+                                                                 Validators.NOT_NULL_OR_EMPTY);
+
+      managementClusterUser = XMLConfigurationUtil.getString(e,
+                                                             "management-cluster-user",
+                                                             managementClusterUser,
+                                                             Validators.NOT_NULL_OR_EMPTY);
+
+      logDelegateFactoryClassName = XMLConfigurationUtil.getString(e,
+                                                                   "log-delegate-factory-class-name",
+                                                                   logDelegateFactoryClassName,
+                                                                   Validators.NOT_NULL_OR_EMPTY);
+
+      NodeList interceptorNodes = e.getElementsByTagName("remoting-interceptors");
+
+      ArrayList<String> interceptorList = new ArrayList<String>();
+
+      if (interceptorNodes.getLength() > 0)
+      {
+         NodeList interceptors = interceptorNodes.item(0).getChildNodes();
+
+         for (int i = 0; i < interceptors.getLength(); i++)
+         {
+            if ("class-name".equalsIgnoreCase(interceptors.item(i).getNodeName()))
+            {
+               String clazz = interceptors.item(i).getTextContent();
+
+               interceptorList.add(clazz);
+            }
+         }
+      }
+
+      interceptorClassNames = interceptorList;
+
+      NodeList backups = e.getElementsByTagName("backup-connector-ref");
+
+      // There should be only one - this will be enforced by the DTD
+
+      if (backups.getLength() > 0)
+      {
+         Node backupNode = backups.item(0);
+
+         backupConnectorName = backupNode.getAttributes().getNamedItem("connector-name").getNodeValue();
+      }
+
+      NodeList connectorNodes = e.getElementsByTagName("connector");
+
+      for (int i = 0; i < connectorNodes.getLength(); i++)
+      {
+         Element connectorNode = (Element)connectorNodes.item(i);
+
+         TransportConfiguration connectorConfig = parseTransportConfiguration(connectorNode);
+
+         if (connectorConfig.getName() == null)
+         {
+            FileConfiguration.log.warn("Cannot deploy a connector with no name specified.");
+
+            continue;
+         }
+
+         if (connectorConfigs.containsKey(connectorConfig.getName()))
+         {
+            FileConfiguration.log.warn("There is already a connector with name " + connectorConfig.getName() +
+                                       " deployed. This one will not be deployed.");
+
+            continue;
+         }
+
+         connectorConfigs.put(connectorConfig.getName(), connectorConfig);
+      }
+
+      NodeList acceptorNodes = e.getElementsByTagName("acceptor");
+
+      for (int i = 0; i < acceptorNodes.getLength(); i++)
+      {
+         Element acceptorNode = (Element)acceptorNodes.item(i);
+
+         TransportConfiguration acceptorConfig = parseTransportConfiguration(acceptorNode);
+
+         acceptorConfigs.add(acceptorConfig);
+      }
+
+      NodeList bgNodes = e.getElementsByTagName("broadcast-group");
+
+      for (int i = 0; i < bgNodes.getLength(); i++)
+      {
+         Element bgNode = (Element)bgNodes.item(i);
+
+         parseBroadcastGroupConfiguration(bgNode);
+      }
+
+      NodeList dgNodes = e.getElementsByTagName("discovery-group");
+
+      for (int i = 0; i < dgNodes.getLength(); i++)
+      {
+         Element dgNode = (Element)dgNodes.item(i);
+
+         parseDiscoveryGroupConfiguration(dgNode);
+      }
+
+      NodeList brNodes = e.getElementsByTagName("bridge");
+
+      for (int i = 0; i < brNodes.getLength(); i++)
+      {
+         Element mfNode = (Element)brNodes.item(i);
+
+         parseBridgeConfiguration(mfNode);
+      }
+
+      NodeList gaNodes = e.getElementsByTagName("grouping-handler");
+
+      for (int i = 0; i < gaNodes.getLength(); i++)
+      {
+         Element gaNode = (Element)gaNodes.item(i);
+
+         parseGroupingHandlerConfiguration(gaNode);
+      }
+
+      NodeList ccNodes = e.getElementsByTagName("cluster-connection");
+
+      for (int i = 0; i < ccNodes.getLength(); i++)
+      {
+         Element ccNode = (Element)ccNodes.item(i);
+
+         parseClusterConnectionConfiguration(ccNode);
+      }
+
+      NodeList dvNodes = e.getElementsByTagName("divert");
+
+      for (int i = 0; i < dvNodes.getLength(); i++)
+      {
+         Element dvNode = (Element)dvNodes.item(i);
+
+         parseDivertConfiguration(dvNode);
+      }
+
+      // Persistence config
+
+      largeMessagesDirectory = XMLConfigurationUtil.getString(e,
+                                                              "large-messages-directory",
+                                                              largeMessagesDirectory,
+                                                              Validators.NOT_NULL_OR_EMPTY);
+
+      bindingsDirectory = XMLConfigurationUtil.getString(e,
+                                                         "bindings-directory",
+                                                         bindingsDirectory,
+                                                         Validators.NOT_NULL_OR_EMPTY);
+
+      createBindingsDir = XMLConfigurationUtil.getBoolean(e, "create-bindings-dir", createBindingsDir);
+
+      journalDirectory = XMLConfigurationUtil.getString(e,
+                                                        "journal-directory",
+                                                        journalDirectory,
+                                                        Validators.NOT_NULL_OR_EMPTY);
+
+      pagingDirectory = XMLConfigurationUtil.getString(e,
+                                                       "paging-directory",
+                                                       pagingDirectory,
+                                                       Validators.NOT_NULL_OR_EMPTY);
+
+      createJournalDir = XMLConfigurationUtil.getBoolean(e, "create-journal-dir", createJournalDir);
+
+      String s = XMLConfigurationUtil.getString(e, "journal-type", journalType.toString(), Validators.JOURNAL_TYPE);
+
+      if (s.equals(JournalType.NIO.toString()))
+      {
+         journalType = JournalType.NIO;
+      }
+      else if (s.equals(JournalType.ASYNCIO.toString()))
+      {
+         journalType = JournalType.ASYNCIO;
+      }
+
+      journalSyncTransactional = XMLConfigurationUtil.getBoolean(e,
+                                                                 "journal-sync-transactional",
+                                                                 journalSyncTransactional);
+
+      journalSyncNonTransactional = XMLConfigurationUtil.getBoolean(e,
+                                                                    "journal-sync-non-transactional",
+                                                                    journalSyncNonTransactional);
+
+      journalFileSize = XMLConfigurationUtil.getInteger(e, "journal-file-size", journalFileSize, Validators.GT_ZERO);
+
+      int journalBufferTimeout = XMLConfigurationUtil.getInteger(e,
+                                                                 "journal-buffer-timeout",
+                                                                 journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO
+                                                                                                   : ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
+                                                                 Validators.GT_ZERO);
+
+      int journalBufferSize = XMLConfigurationUtil.getInteger(e,
+                                                              "journal-buffer-size",
+                                                              journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO
+                                                                                                : ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
+                                                              Validators.GT_ZERO);
+
+      int journalMaxIO = XMLConfigurationUtil.getInteger(e,
+                                                         "journal-max-io",
+                                                         journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO
+                                                                                           : ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO,
+                                                         Validators.GT_ZERO);
+
+      if (journalType == JournalType.ASYNCIO)
+      {
+         journalBufferTimeout_AIO = journalBufferTimeout;
+         journalBufferSize_AIO = journalBufferSize;
+         journalMaxIO_AIO = journalMaxIO;
+      }
+      else
+      {
+         journalBufferTimeout_NIO = journalBufferTimeout;
+         journalBufferSize_NIO = journalBufferSize;
+         journalMaxIO_NIO = journalMaxIO;
+      }
+
+      journalMinFiles = XMLConfigurationUtil.getInteger(e, "journal-min-files", journalMinFiles, Validators.GT_ZERO);
+
+      journalCompactMinFiles = XMLConfigurationUtil.getInteger(e,
+                                                               "journal-compact-min-files",
+                                                               journalCompactMinFiles,
+                                                               Validators.GE_ZERO);
+
+      journalCompactPercentage = XMLConfigurationUtil.getInteger(e,
+                                                                 "journal-compact-percentage",
+                                                                 journalCompactPercentage,
+                                                                 Validators.PERCENTAGE);
+
+      logJournalWriteRate = XMLConfigurationUtil.getBoolean(e,
+                                                            "log-journal-write-rate",
+                                                            ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE);
+
+      journalPerfBlastPages = XMLConfigurationUtil.getInteger(e,
+                                                              "perf-blast-pages",
+                                                              ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES,
+                                                              Validators.MINUS_ONE_OR_GT_ZERO);
+
+      runSyncSpeedTest = XMLConfigurationUtil.getBoolean(e, "run-sync-speed-test", runSyncSpeedTest);
+
+      wildcardRoutingEnabled = XMLConfigurationUtil.getBoolean(e, "wild-card-routing-enabled", wildcardRoutingEnabled);
+
+      messageCounterEnabled = XMLConfigurationUtil.getBoolean(e, "message-counter-enabled", messageCounterEnabled);
+
+      messageCounterSamplePeriod = XMLConfigurationUtil.getLong(e,
+                                                                "message-counter-sample-period",
+                                                                messageCounterSamplePeriod,
+                                                                Validators.GT_ZERO);
+
+      messageCounterMaxDayHistory = XMLConfigurationUtil.getInteger(e,
+                                                                    "message-counter-max-day-history",
+                                                                    messageCounterMaxDayHistory,
+                                                                    Validators.GT_ZERO);
+
+      serverDumpInterval = XMLConfigurationUtil.getLong(e,
+                                                        "server-dump-interval",
+                                                        serverDumpInterval,
+                                                        Validators.MINUS_ONE_OR_GT_ZERO); // in
+      // milliseconds
+
+      memoryWarningThreshold = XMLConfigurationUtil.getInteger(e,
+                                                               "memory-warning-threshold",
+                                                               memoryWarningThreshold,
+                                                               Validators.PERCENTAGE);
+
+      memoryMeasureInterval = XMLConfigurationUtil.getLong(e,
+                                                           "memory-measure-interval",
+                                                           memoryMeasureInterval,
+                                                           Validators.MINUS_ONE_OR_GT_ZERO); // in
+
+      started = true;
+   }
+
+   public synchronized void stop() throws Exception
+   {
+      started = false;
+   }
+
+   public String getConfigurationUrl()
+   {
+      return configurationUrl;
+   }
+
+   public void setConfigurationUrl(final String configurationUrl)
+   {
+      this.configurationUrl = configurationUrl;
+   }
+
+   // Private -------------------------------------------------------------------------
+
+   private TransportConfiguration parseTransportConfiguration(final Element e)
+   {
+      Node nameNode = e.getAttributes().getNamedItem("name");
+
+      String name = nameNode != null ? nameNode.getNodeValue() : null;
+
+      String clazz = XMLConfigurationUtil.getString(e, "factory-class", null, Validators.NOT_NULL_OR_EMPTY);
+
+      Map<String, Object> params = new HashMap<String, Object>();
+
+      NodeList paramsNodes = e.getElementsByTagName("param");
+
+      for (int i = 0; i < paramsNodes.getLength(); i++)
+      {
+         Node paramNode = paramsNodes.item(i);
+         NamedNodeMap attributes = paramNode.getAttributes();
+
+         Node nkey = attributes.getNamedItem("key");
+
+         String key = nkey.getTextContent();
+
+         Node nValue = attributes.getNamedItem("value");
+
+         params.put(key, nValue.getTextContent());
+      }
+
+      return new TransportConfiguration(clazz, params, name);
+   }
+
+   private void parseBroadcastGroupConfiguration(final Element e)
+   {
+      String name = e.getAttribute("name");
+
+      String localAddress = XMLConfigurationUtil.getString(e, "local-bind-address", null, Validators.NO_CHECK);
+
+      int localBindPort = XMLConfigurationUtil.getInteger(e, "local-bind-port", -1, Validators.MINUS_ONE_OR_GT_ZERO);
+
+      String groupAddress = XMLConfigurationUtil.getString(e, "group-address", null, Validators.NOT_NULL_OR_EMPTY);
+
+      int groupPort = XMLConfigurationUtil.getInteger(e, "group-port", -1, Validators.GT_ZERO);
+
+      long broadcastPeriod = XMLConfigurationUtil.getLong(e,
+                                                          "broadcast-period",
+                                                          ConfigurationImpl.DEFAULT_BROADCAST_PERIOD,
+                                                          Validators.GT_ZERO);
+
+      NodeList children = e.getChildNodes();
+
+      List<Pair<String, String>> connectorNames = new ArrayList<Pair<String, String>>();
+
+      for (int j = 0; j < children.getLength(); j++)
+      {
+         Node child = children.item(j);
+
+         if (child.getNodeName().equals("connector-ref"))
+         {
+            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
+
+            Node backupConnectorNode = child.getAttributes().getNamedItem("backup-connector-name");
+
+            String backupConnectorName = null;
+
+            if (backupConnectorNode != null)
+            {
+               backupConnectorName = backupConnectorNode.getNodeValue();
+            }
+
+            Pair<String, String> connectorInfo = new Pair<String, String>(connectorName, backupConnectorName);
+
+            connectorNames.add(connectorInfo);
+         }
+      }
+
+      BroadcastGroupConfiguration config = new BroadcastGroupConfiguration(name,
+                                                                           localAddress,
+                                                                           localBindPort,
+                                                                           groupAddress,
+                                                                           groupPort,
+                                                                           broadcastPeriod,
+                                                                           connectorNames);
+
+      broadcastGroupConfigurations.add(config);
+   }
+
+   private void parseDiscoveryGroupConfiguration(final Element e)
+   {
+      String name = e.getAttribute("name");
+
+      String groupAddress = XMLConfigurationUtil.getString(e, "group-address", null, Validators.NOT_NULL_OR_EMPTY);
+
+      int groupPort = XMLConfigurationUtil.getInteger(e, "group-port", -1, Validators.MINUS_ONE_OR_GT_ZERO);
+
+      long refreshTimeout = XMLConfigurationUtil.getLong(e,
+                                                         "refresh-timeout",
+                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
+                                                         Validators.GT_ZERO);
+
+      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
+                                                                           groupAddress,
+                                                                           groupPort,
+                                                                           refreshTimeout);
+
+      if (discoveryGroupConfigurations.containsKey(name))
+      {
+         FileConfiguration.log.warn("There is already a discovery group with name " + name +
+                                    " deployed. This one will not be deployed.");
+
+         return;
+      }
+      else
+      {
+         discoveryGroupConfigurations.put(name, config);
+      }
+   }
+
+   private void parseClusterConnectionConfiguration(final Element e)
+   {
+      String name = e.getAttribute("name");
+
+      String address = XMLConfigurationUtil.getString(e, "address", null, Validators.NOT_NULL_OR_EMPTY);
+
+      boolean duplicateDetection = XMLConfigurationUtil.getBoolean(e,
+                                                                   "use-duplicate-detection",
+                                                                   ConfigurationImpl.DEFAULT_CLUSTER_DUPLICATE_DETECTION);
+
+      boolean forwardWhenNoConsumers = XMLConfigurationUtil.getBoolean(e,
+                                                                       "forward-when-no-consumers",
+                                                                       ConfigurationImpl.DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS);
+
+      int maxHops = XMLConfigurationUtil.getInteger(e,
+                                                    "max-hops",
+                                                    ConfigurationImpl.DEFAULT_CLUSTER_MAX_HOPS,
+                                                    Validators.GE_ZERO);
+
+      long retryInterval = XMLConfigurationUtil.getLong(e,
+                                                        "retry-interval",
+                                                        ConfigurationImpl.DEFAULT_CLUSTER_RETRY_INTERVAL,
+                                                        Validators.GT_ZERO);
+
+      int confirmationWindowSize = XMLConfigurationUtil.getInteger(e,
+                                                                   "confirmation-window-size",
+                                                                   FileConfiguration.DEFAULT_CONFIRMATION_WINDOW_SIZE,
+                                                                   Validators.GT_ZERO);
+
+      String discoveryGroupName = null;
+
+      List<Pair<String, String>> connectorPairs = new ArrayList<Pair<String, String>>();
+
+      NodeList children = e.getChildNodes();
+
+      for (int j = 0; j < children.getLength(); j++)
+      {
+         Node child = children.item(j);
+
+         if (child.getNodeName().equals("discovery-group-ref"))
+         {
+            discoveryGroupName = child.getAttributes().getNamedItem("discovery-group-name").getNodeValue();
+         }
+         else if (child.getNodeName().equals("connector-ref"))
+         {
+            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
+
+            Node backupNode = child.getAttributes().getNamedItem("backup-connector-name");
+
+            String backupConnectorName = null;
+
+            if (backupNode != null)
+            {
+               backupConnectorName = backupNode.getNodeValue();
+            }
+
+            Pair<String, String> connectorPair = new Pair<String, String>(connectorName, backupConnectorName);
+
+            connectorPairs.add(connectorPair);
+         }
+      }
+
+      ClusterConnectionConfiguration config;
+
+      if (discoveryGroupName == null)
+      {
+         config = new ClusterConnectionConfiguration(name,
+                                                     address,
+                                                     retryInterval,
+                                                     duplicateDetection,
+                                                     forwardWhenNoConsumers,
+                                                     maxHops,
+                                                     confirmationWindowSize,
+                                                     connectorPairs);
+      }
+      else
+      {
+         config = new ClusterConnectionConfiguration(name,
+                                                     address,
+                                                     retryInterval,
+                                                     duplicateDetection,
+                                                     forwardWhenNoConsumers,
+                                                     maxHops,
+                                                     confirmationWindowSize,
+                                                     discoveryGroupName);
+      }
+
+      clusterConfigurations.add(config);
+   }
+
+   private void parseGroupingHandlerConfiguration(final Element node)
+   {
+      String name = node.getAttribute("name");
+      String type = XMLConfigurationUtil.getString(node, "type", null, Validators.NOT_NULL_OR_EMPTY);
+      String address = XMLConfigurationUtil.getString(node, "address", null, Validators.NOT_NULL_OR_EMPTY);
+      Integer timeout = XMLConfigurationUtil.getInteger(node,
+                                                        "timeout",
+                                                        GroupingHandlerConfiguration.DEFAULT_TIMEOUT,
+                                                        Validators.GT_ZERO);
+      groupingHandlerConfiguration = new GroupingHandlerConfiguration(new SimpleString(name),
+                                                                      type.equals(GroupingHandlerConfiguration.TYPE.LOCAL.getType()) ? GroupingHandlerConfiguration.TYPE.LOCAL
+                                                                                                                                    : GroupingHandlerConfiguration.TYPE.REMOTE,
+                                                                      new SimpleString(address),
+                                                                      timeout);
+   }
+
+   private void parseBridgeConfiguration(final Element brNode)
+   {
+      String name = brNode.getAttribute("name");
+
+      String queueName = XMLConfigurationUtil.getString(brNode, "queue-name", null, Validators.NOT_NULL_OR_EMPTY);
+
+      String forwardingAddress = XMLConfigurationUtil.getString(brNode,
+                                                                "forwarding-address",
+                                                                null,
+                                                                Validators.NOT_NULL_OR_EMPTY);
+
+      String transformerClassName = XMLConfigurationUtil.getString(brNode,
+                                                                   "transformer-class-name",
+                                                                   null,
+                                                                   Validators.NO_CHECK);
+
+      long retryInterval = XMLConfigurationUtil.getLong(brNode,
+                                                        "retry-interval",
+                                                        ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
+                                                        Validators.GT_ZERO);
+
+      // Default bridge conf
+      int confirmationWindowSize = XMLConfigurationUtil.getInteger(brNode,
+                                                                   "confirmation-window-size",
+                                                                   FileConfiguration.DEFAULT_CONFIRMATION_WINDOW_SIZE,
+                                                                   Validators.GT_ZERO);
+
+      double retryIntervalMultiplier = XMLConfigurationUtil.getDouble(brNode,
+                                                                      "retry-interval-multiplier",
+                                                                      ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+                                                                      Validators.GT_ZERO);
+
+      int reconnectAttempts = XMLConfigurationUtil.getInteger(brNode,
+                                                              "reconnect-attempts",
+                                                              ConfigurationImpl.DEFAULT_BRIDGE_RECONNECT_ATTEMPTS,
+                                                              Validators.MINUS_ONE_OR_GE_ZERO);
+
+      boolean failoverOnServerShutdown = XMLConfigurationUtil.getBoolean(brNode,
+                                                                         "failover-on-server-shutdown",
+                                                                         ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+
+      boolean useDuplicateDetection = XMLConfigurationUtil.getBoolean(brNode,
+                                                                      "use-duplicate-detection",
+                                                                      ConfigurationImpl.DEFAULT_BRIDGE_DUPLICATE_DETECTION);
+
+      String filterString = null;
+
+      Pair<String, String> connectorPair = null;
+
+      String discoveryGroupName = null;
+
+      NodeList children = brNode.getChildNodes();
+
+      for (int j = 0; j < children.getLength(); j++)
+      {
+         Node child = children.item(j);
+
+         if (child.getNodeName().equals("filter"))
+         {
+            filterString = child.getAttributes().getNamedItem("string").getNodeValue();
+         }
+         else if (child.getNodeName().equals("discovery-group-ref"))
+         {
+            discoveryGroupName = child.getAttributes().getNamedItem("discovery-group-name").getNodeValue();
+         }
+         else if (child.getNodeName().equals("connector-ref"))
+         {
+            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
+
+            Node backupNode = child.getAttributes().getNamedItem("backup-connector-name");
+
+            String backupConnectorName = null;
+
+            if (backupNode != null)
+            {
+               backupConnectorName = backupNode.getNodeValue();
+            }
+
+            connectorPair = new Pair<String, String>(connectorName, backupConnectorName);
+         }
+      }
+
+      BridgeConfiguration config;
+
+      if (connectorPair != null)
+      {
+         config = new BridgeConfiguration(name,
+                                          queueName,
+                                          forwardingAddress,
+                                          filterString,
+                                          transformerClassName,
+                                          retryInterval,
+                                          retryIntervalMultiplier,
+                                          reconnectAttempts,
+                                          failoverOnServerShutdown,
+                                          useDuplicateDetection,
+                                          confirmationWindowSize,
+                                          ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
+                                          connectorPair);
+      }
+      else
+      {
+         config = new BridgeConfiguration(name,
+                                          queueName,
+                                          forwardingAddress,
+                                          filterString,
+                                          transformerClassName,
+                                          retryInterval,
+                                          retryIntervalMultiplier,
+                                          reconnectAttempts,
+                                          failoverOnServerShutdown,
+                                          useDuplicateDetection,
+                                          confirmationWindowSize,
+                                          ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
+                                          discoveryGroupName);
+      }
+
+      bridgeConfigurations.add(config);
+   }
+
+   private void parseDivertConfiguration(final Element e)
+   {
+      String name = e.getAttribute("name");
+
+      String routingName = XMLConfigurationUtil.getString(e, "routing-name", null, Validators.NO_CHECK);
+
+      String address = XMLConfigurationUtil.getString(e, "address", null, Validators.NOT_NULL_OR_EMPTY);
+
+      String forwardingAddress = XMLConfigurationUtil.getString(e,
+                                                                "forwarding-address",
+                                                                null,
+                                                                Validators.NOT_NULL_OR_EMPTY);
+
+      boolean exclusive = XMLConfigurationUtil.getBoolean(e, "exclusive", ConfigurationImpl.DEFAULT_DIVERT_EXCLUSIVE);
+
+      String transformerClassName = XMLConfigurationUtil.getString(e,
+                                                                   "transformer-class-name",
+                                                                   null,
+                                                                   Validators.NO_CHECK);
+
+      String filterString = null;
+
+      NodeList children = e.getChildNodes();
+
+      for (int j = 0; j < children.getLength(); j++)
+      {
+         Node child = children.item(j);
+
+         if (child.getNodeName().equals("filter"))
+         {
+            filterString = child.getAttributes().getNamedItem("string").getNodeValue();
+         }
+      }
+
+      DivertConfiguration config = new DivertConfiguration(name,
+                                                           routingName,
+                                                           address,
+                                                           forwardingAddress,
+                                                           exclusive,
+                                                           filterString,
+                                                           transformerClassName);
+
+      divertConfigurations.add(config);
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,294 +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.core.config.cluster;
-
-import java.io.Serializable;
-
-import org.hornetq.Pair;
-
-/**
- * A BridgeConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 13 Jan 2009 09:32:43
- *
- *
- */
-public class BridgeConfiguration implements Serializable
-{
-   private static final long serialVersionUID = -1057244274380572226L;
-
-   private String name;
-
-   private String queueName;
-
-   private String forwardingAddress;
-
-   private String filterString;
-
-   private Pair<String, String> connectorPair;
-
-   private String discoveryGroupName;
-
-   private String transformerClassName;
-
-   private long retryInterval;
-
-   private double retryIntervalMultiplier;
-
-   private int reconnectAttempts;
-
-   private boolean failoverOnServerShutdown;
-
-   private boolean useDuplicateDetection;
-
-   private int confirmationWindowSize;
-
-   private final long clientFailureCheckPeriod;
-
-   public BridgeConfiguration(final String name,
-                              final String queueName,
-                              final String forwardingAddress,
-                              final String filterString,
-                              final String transformerClassName,
-                              final long retryInterval,
-                              final double retryIntervalMultiplier,
-                              final int reconnectAttempts,
-                              final boolean failoverOnServerShutdown,
-                              final boolean useDuplicateDetection,
-                              final int confirmationWindowSize,
-                              final long clientFailureCheckPeriod,
-                              final Pair<String, String> connectorPair)
-   {
-      this.name = name;
-      this.queueName = queueName;
-      this.forwardingAddress = forwardingAddress;
-      this.filterString = filterString;
-      this.transformerClassName = transformerClassName;
-      this.retryInterval = retryInterval;
-      this.retryIntervalMultiplier = retryIntervalMultiplier;
-      this.reconnectAttempts = reconnectAttempts;
-      this.failoverOnServerShutdown = failoverOnServerShutdown;
-      this.useDuplicateDetection = useDuplicateDetection;
-      this.confirmationWindowSize = confirmationWindowSize;
-      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
-      this.connectorPair = connectorPair;
-      discoveryGroupName = null;
-   }
-
-   public BridgeConfiguration(final String name,
-                              final String queueName,
-                              final String forwardingAddress,
-                              final String filterString,
-                              final String transformerClassName,
-                              final long retryInterval,
-                              final double retryIntervalMultiplier,
-                              final int reconnectAttempts,
-                              final boolean failoverOnServerShutdown,
-                              final boolean useDuplicateDetection,
-                              final int confirmationWindowSize,
-                              final long clientFailureCheckPeriod,
-                              final String discoveryGroupName)
-   {
-      this.name = name;
-      this.queueName = queueName;
-      this.forwardingAddress = forwardingAddress;
-      this.filterString = filterString;
-      this.transformerClassName = transformerClassName;
-      this.retryInterval = retryInterval;
-      this.retryIntervalMultiplier = retryIntervalMultiplier;
-      this.reconnectAttempts = reconnectAttempts;
-      this.failoverOnServerShutdown = failoverOnServerShutdown;
-      this.useDuplicateDetection = useDuplicateDetection;
-      this.confirmationWindowSize = confirmationWindowSize;
-      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
-      connectorPair = null;
-      this.discoveryGroupName = discoveryGroupName;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getQueueName()
-   {
-      return queueName;
-   }
-
-   public String getForwardingAddress()
-   {
-      return forwardingAddress;
-   }
-
-   public String getFilterString()
-   {
-      return filterString;
-   }
-
-   public String getTransformerClassName()
-   {
-      return transformerClassName;
-   }
-
-   public Pair<String, String> getConnectorPair()
-   {
-      return connectorPair;
-   }
-
-   public String getDiscoveryGroupName()
-   {
-      return discoveryGroupName;
-   }
-
-   public long getRetryInterval()
-   {
-      return retryInterval;
-   }
-
-   public double getRetryIntervalMultiplier()
-   {
-      return retryIntervalMultiplier;
-   }
-
-   public int getReconnectAttempts()
-   {
-      return reconnectAttempts;
-   }
-
-   public boolean isFailoverOnServerShutdown()
-   {
-      return failoverOnServerShutdown;
-   }
-
-   public boolean isUseDuplicateDetection()
-   {
-      return useDuplicateDetection;
-   }
-
-   public int getConfirmationWindowSize()
-   {
-      return confirmationWindowSize;
-   }
-
-   public long getClientFailureCheckPeriod()
-   {
-      return clientFailureCheckPeriod;
-   }
-
-   /**
-    * @param name the name to set
-    */
-   public void setName(final String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * @param queueName the queueName to set
-    */
-   public void setQueueName(final String queueName)
-   {
-      this.queueName = queueName;
-   }
-
-   /**
-    * @param forwardingAddress the forwardingAddress to set
-    */
-   public void setForwardingAddress(final String forwardingAddress)
-   {
-      this.forwardingAddress = forwardingAddress;
-   }
-
-   /**
-    * @param filterString the filterString to set
-    */
-   public void setFilterString(final String filterString)
-   {
-      this.filterString = filterString;
-   }
-
-   /**
-    * @param connectorPair the connectorPair to set
-    */
-   public void setConnectorPair(final Pair<String, String> connectorPair)
-   {
-      this.connectorPair = connectorPair;
-   }
-
-   /**
-    * @param discoveryGroupName the discoveryGroupName to set
-    */
-   public void setDiscoveryGroupName(final String discoveryGroupName)
-   {
-      this.discoveryGroupName = discoveryGroupName;
-   }
-
-   /**
-    * @param transformerClassName the transformerClassName to set
-    */
-   public void setTransformerClassName(final String transformerClassName)
-   {
-      this.transformerClassName = transformerClassName;
-   }
-
-   /**
-    * @param retryInterval the retryInterval to set
-    */
-   public void setRetryInterval(final long retryInterval)
-   {
-      this.retryInterval = retryInterval;
-   }
-
-   /**
-    * @param retryIntervalMultiplier the retryIntervalMultiplier to set
-    */
-   public void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
-   {
-      this.retryIntervalMultiplier = retryIntervalMultiplier;
-   }
-
-   /**
-    * @param reconnectAttempts the reconnectAttempts to set
-    */
-   public void setReconnectAttempts(final int reconnectAttempts)
-   {
-      this.reconnectAttempts = reconnectAttempts;
-   }
-
-   /**
-    * @param failoverOnServerShutdown the failoverOnServerShutdown to set
-    */
-   public void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
-   {
-      this.failoverOnServerShutdown = failoverOnServerShutdown;
-   }
-
-   /**
-    * @param useDuplicateDetection the useDuplicateDetection to set
-    */
-   public void setUseDuplicateDetection(final boolean useDuplicateDetection)
-   {
-      this.useDuplicateDetection = useDuplicateDetection;
-   }
-
-   /**
-    * @param confirmationWindowSize the confirmationWindowSize to set
-    */
-   public void setConfirmationWindowSize(final int confirmationWindowSize)
-   {
-      this.confirmationWindowSize = confirmationWindowSize;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java (from rev 8697, trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/BridgeConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,294 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+
+import org.hornetq.Pair;
+
+/**
+ * A BridgeConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 13 Jan 2009 09:32:43
+ *
+ *
+ */
+public class BridgeConfiguration implements Serializable
+{
+   private static final long serialVersionUID = -1057244274380572226L;
+
+   private String name;
+
+   private String queueName;
+
+   private String forwardingAddress;
+
+   private String filterString;
+
+   private Pair<String, String> connectorPair;
+
+   private String discoveryGroupName;
+
+   private String transformerClassName;
+
+   private long retryInterval;
+
+   private double retryIntervalMultiplier;
+
+   private int reconnectAttempts;
+
+   private boolean failoverOnServerShutdown;
+
+   private boolean useDuplicateDetection;
+
+   private int confirmationWindowSize;
+
+   private final long clientFailureCheckPeriod;
+
+   public BridgeConfiguration(final String name,
+                              final String queueName,
+                              final String forwardingAddress,
+                              final String filterString,
+                              final String transformerClassName,
+                              final long retryInterval,
+                              final double retryIntervalMultiplier,
+                              final int reconnectAttempts,
+                              final boolean failoverOnServerShutdown,
+                              final boolean useDuplicateDetection,
+                              final int confirmationWindowSize,
+                              final long clientFailureCheckPeriod,
+                              final Pair<String, String> connectorPair)
+   {
+      this.name = name;
+      this.queueName = queueName;
+      this.forwardingAddress = forwardingAddress;
+      this.filterString = filterString;
+      this.transformerClassName = transformerClassName;
+      this.retryInterval = retryInterval;
+      this.retryIntervalMultiplier = retryIntervalMultiplier;
+      this.reconnectAttempts = reconnectAttempts;
+      this.failoverOnServerShutdown = failoverOnServerShutdown;
+      this.useDuplicateDetection = useDuplicateDetection;
+      this.confirmationWindowSize = confirmationWindowSize;
+      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
+      this.connectorPair = connectorPair;
+      discoveryGroupName = null;
+   }
+
+   public BridgeConfiguration(final String name,
+                              final String queueName,
+                              final String forwardingAddress,
+                              final String filterString,
+                              final String transformerClassName,
+                              final long retryInterval,
+                              final double retryIntervalMultiplier,
+                              final int reconnectAttempts,
+                              final boolean failoverOnServerShutdown,
+                              final boolean useDuplicateDetection,
+                              final int confirmationWindowSize,
+                              final long clientFailureCheckPeriod,
+                              final String discoveryGroupName)
+   {
+      this.name = name;
+      this.queueName = queueName;
+      this.forwardingAddress = forwardingAddress;
+      this.filterString = filterString;
+      this.transformerClassName = transformerClassName;
+      this.retryInterval = retryInterval;
+      this.retryIntervalMultiplier = retryIntervalMultiplier;
+      this.reconnectAttempts = reconnectAttempts;
+      this.failoverOnServerShutdown = failoverOnServerShutdown;
+      this.useDuplicateDetection = useDuplicateDetection;
+      this.confirmationWindowSize = confirmationWindowSize;
+      this.clientFailureCheckPeriod = clientFailureCheckPeriod;
+      connectorPair = null;
+      this.discoveryGroupName = discoveryGroupName;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getQueueName()
+   {
+      return queueName;
+   }
+
+   public String getForwardingAddress()
+   {
+      return forwardingAddress;
+   }
+
+   public String getFilterString()
+   {
+      return filterString;
+   }
+
+   public String getTransformerClassName()
+   {
+      return transformerClassName;
+   }
+
+   public Pair<String, String> getConnectorPair()
+   {
+      return connectorPair;
+   }
+
+   public String getDiscoveryGroupName()
+   {
+      return discoveryGroupName;
+   }
+
+   public long getRetryInterval()
+   {
+      return retryInterval;
+   }
+
+   public double getRetryIntervalMultiplier()
+   {
+      return retryIntervalMultiplier;
+   }
+
+   public int getReconnectAttempts()
+   {
+      return reconnectAttempts;
+   }
+
+   public boolean isFailoverOnServerShutdown()
+   {
+      return failoverOnServerShutdown;
+   }
+
+   public boolean isUseDuplicateDetection()
+   {
+      return useDuplicateDetection;
+   }
+
+   public int getConfirmationWindowSize()
+   {
+      return confirmationWindowSize;
+   }
+
+   public long getClientFailureCheckPeriod()
+   {
+      return clientFailureCheckPeriod;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(final String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @param queueName the queueName to set
+    */
+   public void setQueueName(final String queueName)
+   {
+      this.queueName = queueName;
+   }
+
+   /**
+    * @param forwardingAddress the forwardingAddress to set
+    */
+   public void setForwardingAddress(final String forwardingAddress)
+   {
+      this.forwardingAddress = forwardingAddress;
+   }
+
+   /**
+    * @param filterString the filterString to set
+    */
+   public void setFilterString(final String filterString)
+   {
+      this.filterString = filterString;
+   }
+
+   /**
+    * @param connectorPair the connectorPair to set
+    */
+   public void setConnectorPair(final Pair<String, String> connectorPair)
+   {
+      this.connectorPair = connectorPair;
+   }
+
+   /**
+    * @param discoveryGroupName the discoveryGroupName to set
+    */
+   public void setDiscoveryGroupName(final String discoveryGroupName)
+   {
+      this.discoveryGroupName = discoveryGroupName;
+   }
+
+   /**
+    * @param transformerClassName the transformerClassName to set
+    */
+   public void setTransformerClassName(final String transformerClassName)
+   {
+      this.transformerClassName = transformerClassName;
+   }
+
+   /**
+    * @param retryInterval the retryInterval to set
+    */
+   public void setRetryInterval(final long retryInterval)
+   {
+      this.retryInterval = retryInterval;
+   }
+
+   /**
+    * @param retryIntervalMultiplier the retryIntervalMultiplier to set
+    */
+   public void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
+   {
+      this.retryIntervalMultiplier = retryIntervalMultiplier;
+   }
+
+   /**
+    * @param reconnectAttempts the reconnectAttempts to set
+    */
+   public void setReconnectAttempts(final int reconnectAttempts)
+   {
+      this.reconnectAttempts = reconnectAttempts;
+   }
+
+   /**
+    * @param failoverOnServerShutdown the failoverOnServerShutdown to set
+    */
+   public void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
+   {
+      this.failoverOnServerShutdown = failoverOnServerShutdown;
+   }
+
+   /**
+    * @param useDuplicateDetection the useDuplicateDetection to set
+    */
+   public void setUseDuplicateDetection(final boolean useDuplicateDetection)
+   {
+      this.useDuplicateDetection = useDuplicateDetection;
+   }
+
+   /**
+    * @param confirmationWindowSize the confirmationWindowSize to set
+    */
+   public void setConfirmationWindowSize(final int confirmationWindowSize)
+   {
+      this.confirmationWindowSize = confirmationWindowSize;
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,159 +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.core.config.cluster;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.hornetq.Pair;
-import org.hornetq.core.logging.Logger;
-
-/**
- * A BroadcastGroupConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 18 Nov 2008 08:44:30
- *
- */
-public class BroadcastGroupConfiguration implements Serializable
-{
-   private static final long serialVersionUID = 1052413739064253955L;
-
-   private static final Logger log = Logger.getLogger(BroadcastGroupConfiguration.class);
-
-   private String name;
-
-   private String localBindAddress;
-
-   private int localBindPort;
-
-   private String groupAddress;
-
-   private int groupPort;
-
-   private long broadcastPeriod;
-
-   private List<Pair<String, String>> connectorInfos;
-
-   public BroadcastGroupConfiguration(final String name,
-                                      final String localBindAddress,
-                                      final int localBindPort,
-                                      final String groupAddress,
-                                      final int groupPort,
-                                      final long broadcastPeriod,
-                                      final List<Pair<String, String>> connectorInfos)
-   {
-      super();
-      this.name = name;
-      this.localBindAddress = localBindAddress;
-      this.localBindPort = localBindPort;
-      this.groupAddress = groupAddress;
-      this.groupPort = groupPort;
-      this.broadcastPeriod = broadcastPeriod;
-      this.connectorInfos = connectorInfos;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getLocalBindAddress()
-   {
-      return localBindAddress;
-   }
-
-   public int getLocalBindPort()
-   {
-      return localBindPort;
-   }
-
-   public String getGroupAddress()
-   {
-      return groupAddress;
-   }
-
-   public int getGroupPort()
-   {
-      return groupPort;
-   }
-
-   public long getBroadcastPeriod()
-   {
-      return broadcastPeriod;
-   }
-
-   public List<Pair<String, String>> getConnectorInfos()
-   {
-      return connectorInfos;
-   }
-
-   /**
-    * @param name the name to set
-    */
-   public void setName(final String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * @param localBindAddress the localBindAddress to set
-    */
-   public void setLocalBindAddress(final String localBindAddress)
-   {
-      this.localBindAddress = localBindAddress;
-   }
-
-   /**
-    * @param localBindPort the localBindPort to set
-    */
-   public void setLocalBindPort(final int localBindPort)
-   {
-      this.localBindPort = localBindPort;
-   }
-
-   /**
-    * @param groupAddress the groupAddress to set
-    */
-   public void setGroupAddress(final String groupAddress)
-   {
-      this.groupAddress = groupAddress;
-   }
-
-   /**
-    * @param groupPort the groupPort to set
-    */
-   public void setGroupPort(final int groupPort)
-   {
-      this.groupPort = groupPort;
-   }
-
-   /**
-    * @param broadcastPeriod the broadcastPeriod to set
-    */
-   public void setBroadcastPeriod(final long broadcastPeriod)
-   {
-      this.broadcastPeriod = broadcastPeriod;
-   }
-
-   /**
-    * @param connectorInfos the connectorInfos to set
-    */
-   public void setConnectorInfos(final List<Pair<String, String>> connectorInfos)
-   {
-      this.connectorInfos = connectorInfos;
-   }
-
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java (from rev 8697, trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/BroadcastGroupConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,159 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.hornetq.Pair;
+import org.hornetq.core.logging.Logger;
+
+/**
+ * A BroadcastGroupConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 18 Nov 2008 08:44:30
+ *
+ */
+public class BroadcastGroupConfiguration implements Serializable
+{
+   private static final long serialVersionUID = 1052413739064253955L;
+
+   private static final Logger log = Logger.getLogger(BroadcastGroupConfiguration.class);
+
+   private String name;
+
+   private String localBindAddress;
+
+   private int localBindPort;
+
+   private String groupAddress;
+
+   private int groupPort;
+
+   private long broadcastPeriod;
+
+   private List<Pair<String, String>> connectorInfos;
+
+   public BroadcastGroupConfiguration(final String name,
+                                      final String localBindAddress,
+                                      final int localBindPort,
+                                      final String groupAddress,
+                                      final int groupPort,
+                                      final long broadcastPeriod,
+                                      final List<Pair<String, String>> connectorInfos)
+   {
+      super();
+      this.name = name;
+      this.localBindAddress = localBindAddress;
+      this.localBindPort = localBindPort;
+      this.groupAddress = groupAddress;
+      this.groupPort = groupPort;
+      this.broadcastPeriod = broadcastPeriod;
+      this.connectorInfos = connectorInfos;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getLocalBindAddress()
+   {
+      return localBindAddress;
+   }
+
+   public int getLocalBindPort()
+   {
+      return localBindPort;
+   }
+
+   public String getGroupAddress()
+   {
+      return groupAddress;
+   }
+
+   public int getGroupPort()
+   {
+      return groupPort;
+   }
+
+   public long getBroadcastPeriod()
+   {
+      return broadcastPeriod;
+   }
+
+   public List<Pair<String, String>> getConnectorInfos()
+   {
+      return connectorInfos;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(final String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @param localBindAddress the localBindAddress to set
+    */
+   public void setLocalBindAddress(final String localBindAddress)
+   {
+      this.localBindAddress = localBindAddress;
+   }
+
+   /**
+    * @param localBindPort the localBindPort to set
+    */
+   public void setLocalBindPort(final int localBindPort)
+   {
+      this.localBindPort = localBindPort;
+   }
+
+   /**
+    * @param groupAddress the groupAddress to set
+    */
+   public void setGroupAddress(final String groupAddress)
+   {
+      this.groupAddress = groupAddress;
+   }
+
+   /**
+    * @param groupPort the groupPort to set
+    */
+   public void setGroupPort(final int groupPort)
+   {
+      this.groupPort = groupPort;
+   }
+
+   /**
+    * @param broadcastPeriod the broadcastPeriod to set
+    */
+   public void setBroadcastPeriod(final long broadcastPeriod)
+   {
+      this.broadcastPeriod = broadcastPeriod;
+   }
+
+   /**
+    * @param connectorInfos the connectorInfos to set
+    */
+   public void setConnectorInfos(final List<Pair<String, String>> connectorInfos)
+   {
+      this.connectorInfos = connectorInfos;
+   }
+
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,136 +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.core.config.cluster;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.hornetq.Pair;
-
-/**
- * A ClusterConnectionConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 13 Jan 2009 09:42:17
- *
- *
- */
-public class ClusterConnectionConfiguration implements Serializable
-{
-   private static final long serialVersionUID = 8948303813427795935L;
-
-   private final String name;
-
-   private final String address;
-
-   private final long retryInterval;
-
-   private final boolean duplicateDetection;
-
-   private final boolean forwardWhenNoConsumers;
-
-   private final List<Pair<String, String>> staticConnectorNamePairs;
-
-   private final String discoveryGroupName;
-
-   private final int maxHops;
-
-   private final int confirmationWindowSize;
-
-   public ClusterConnectionConfiguration(final String name,
-                                         final String address,
-                                         final long retryInterval,
-                                         final boolean duplicateDetection,
-                                         final boolean forwardWhenNoConsumers,
-                                         final int maxHops,
-                                         final int confirmationWindowSize,
-                                         final List<Pair<String, String>> staticConnectorNamePairs)
-   {
-      this.name = name;
-      this.address = address;
-      this.retryInterval = retryInterval;
-      this.staticConnectorNamePairs = staticConnectorNamePairs;
-      this.duplicateDetection = duplicateDetection;
-      this.forwardWhenNoConsumers = forwardWhenNoConsumers;
-      discoveryGroupName = null;
-      this.maxHops = maxHops;
-      this.confirmationWindowSize = confirmationWindowSize;
-   }
-
-   public ClusterConnectionConfiguration(final String name,
-                                         final String address,
-                                         final long retryInterval,
-                                         final boolean duplicateDetection,
-                                         final boolean forwardWhenNoConsumers,
-                                         final int maxHops,
-                                         final int confirmationWindowSize,
-                                         final String discoveryGroupName)
-   {
-      this.name = name;
-      this.address = address;
-      this.retryInterval = retryInterval;
-      this.duplicateDetection = duplicateDetection;
-      this.forwardWhenNoConsumers = forwardWhenNoConsumers;
-      this.discoveryGroupName = discoveryGroupName;
-      staticConnectorNamePairs = null;
-      this.maxHops = maxHops;
-      this.confirmationWindowSize = confirmationWindowSize;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getAddress()
-   {
-      return address;
-   }
-
-   public boolean isDuplicateDetection()
-   {
-      return duplicateDetection;
-   }
-
-   public boolean isForwardWhenNoConsumers()
-   {
-      return forwardWhenNoConsumers;
-   }
-
-   public int getMaxHops()
-   {
-      return maxHops;
-   }
-
-   public int getConfirmationWindowSize()
-   {
-      return confirmationWindowSize;
-   }
-
-   public List<Pair<String, String>> getStaticConnectorNamePairs()
-   {
-      return staticConnectorNamePairs;
-   }
-
-   public String getDiscoveryGroupName()
-   {
-      return discoveryGroupName;
-   }
-
-   public long getRetryInterval()
-   {
-      return retryInterval;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java (from rev 8697, trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/ClusterConnectionConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,136 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.hornetq.Pair;
+
+/**
+ * A ClusterConnectionConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 13 Jan 2009 09:42:17
+ *
+ *
+ */
+public class ClusterConnectionConfiguration implements Serializable
+{
+   private static final long serialVersionUID = 8948303813427795935L;
+
+   private final String name;
+
+   private final String address;
+
+   private final long retryInterval;
+
+   private final boolean duplicateDetection;
+
+   private final boolean forwardWhenNoConsumers;
+
+   private final List<Pair<String, String>> staticConnectorNamePairs;
+
+   private final String discoveryGroupName;
+
+   private final int maxHops;
+
+   private final int confirmationWindowSize;
+
+   public ClusterConnectionConfiguration(final String name,
+                                         final String address,
+                                         final long retryInterval,
+                                         final boolean duplicateDetection,
+                                         final boolean forwardWhenNoConsumers,
+                                         final int maxHops,
+                                         final int confirmationWindowSize,
+                                         final List<Pair<String, String>> staticConnectorNamePairs)
+   {
+      this.name = name;
+      this.address = address;
+      this.retryInterval = retryInterval;
+      this.staticConnectorNamePairs = staticConnectorNamePairs;
+      this.duplicateDetection = duplicateDetection;
+      this.forwardWhenNoConsumers = forwardWhenNoConsumers;
+      discoveryGroupName = null;
+      this.maxHops = maxHops;
+      this.confirmationWindowSize = confirmationWindowSize;
+   }
+
+   public ClusterConnectionConfiguration(final String name,
+                                         final String address,
+                                         final long retryInterval,
+                                         final boolean duplicateDetection,
+                                         final boolean forwardWhenNoConsumers,
+                                         final int maxHops,
+                                         final int confirmationWindowSize,
+                                         final String discoveryGroupName)
+   {
+      this.name = name;
+      this.address = address;
+      this.retryInterval = retryInterval;
+      this.duplicateDetection = duplicateDetection;
+      this.forwardWhenNoConsumers = forwardWhenNoConsumers;
+      this.discoveryGroupName = discoveryGroupName;
+      staticConnectorNamePairs = null;
+      this.maxHops = maxHops;
+      this.confirmationWindowSize = confirmationWindowSize;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getAddress()
+   {
+      return address;
+   }
+
+   public boolean isDuplicateDetection()
+   {
+      return duplicateDetection;
+   }
+
+   public boolean isForwardWhenNoConsumers()
+   {
+      return forwardWhenNoConsumers;
+   }
+
+   public int getMaxHops()
+   {
+      return maxHops;
+   }
+
+   public int getConfirmationWindowSize()
+   {
+      return confirmationWindowSize;
+   }
+
+   public List<Pair<String, String>> getStaticConnectorNamePairs()
+   {
+      return staticConnectorNamePairs;
+   }
+
+   public String getDiscoveryGroupName()
+   {
+      return discoveryGroupName;
+   }
+
+   public long getRetryInterval()
+   {
+      return retryInterval;
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,101 +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.core.config.cluster;
-
-import java.io.Serializable;
-
-/**
- * A DiscoveryGroupConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 18 Nov 2008 08:47:30
- *
- *
- */
-public class DiscoveryGroupConfiguration implements Serializable
-{
-   private static final long serialVersionUID = 8657206421727863400L;
-
-   private String name;
-
-   private String groupAddress;
-
-   private int groupPort;
-
-   private long refreshTimeout;
-
-   public DiscoveryGroupConfiguration(final String name,
-                                      final String groupAddress,
-                                      final int groupPort,
-                                      final long refreshTimeout)
-   {
-      this.name = name;
-      this.groupAddress = groupAddress;
-      this.groupPort = groupPort;
-      this.refreshTimeout = refreshTimeout;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getGroupAddress()
-   {
-      return groupAddress;
-   }
-
-   public int getGroupPort()
-   {
-      return groupPort;
-   }
-
-   public long getRefreshTimeout()
-   {
-      return refreshTimeout;
-   }
-
-   /**
-    * @param name the name to set
-    */
-   public void setName(final String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * @param groupAddress the groupAddress to set
-    */
-   public void setGroupAddress(final String groupAddress)
-   {
-      this.groupAddress = groupAddress;
-   }
-
-   /**
-    * @param groupPort the groupPort to set
-    */
-   public void setGroupPort(final int groupPort)
-   {
-      this.groupPort = groupPort;
-   }
-
-   /**
-    * @param refreshTimeout the refreshTimeout to set
-    */
-   public void setRefreshTimeout(final long refreshTimeout)
-   {
-      this.refreshTimeout = refreshTimeout;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java (from rev 8663, trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/DiscoveryGroupConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,101 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+
+/**
+ * A DiscoveryGroupConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 18 Nov 2008 08:47:30
+ *
+ *
+ */
+public class DiscoveryGroupConfiguration implements Serializable
+{
+   private static final long serialVersionUID = 8657206421727863400L;
+
+   private String name;
+
+   private String groupAddress;
+
+   private int groupPort;
+
+   private long refreshTimeout;
+
+   public DiscoveryGroupConfiguration(final String name,
+                                      final String groupAddress,
+                                      final int groupPort,
+                                      final long refreshTimeout)
+   {
+      this.name = name;
+      this.groupAddress = groupAddress;
+      this.groupPort = groupPort;
+      this.refreshTimeout = refreshTimeout;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getGroupAddress()
+   {
+      return groupAddress;
+   }
+
+   public int getGroupPort()
+   {
+      return groupPort;
+   }
+
+   public long getRefreshTimeout()
+   {
+      return refreshTimeout;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(final String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @param groupAddress the groupAddress to set
+    */
+   public void setGroupAddress(final String groupAddress)
+   {
+      this.groupAddress = groupAddress;
+   }
+
+   /**
+    * @param groupPort the groupPort to set
+    */
+   public void setGroupPort(final int groupPort)
+   {
+      this.groupPort = groupPort;
+   }
+
+   /**
+    * @param refreshTimeout the refreshTimeout to set
+    */
+   public void setRefreshTimeout(final long refreshTimeout)
+   {
+      this.refreshTimeout = refreshTimeout;
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,164 +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.core.config.cluster;
-
-import java.io.Serializable;
-
-import org.hornetq.core.logging.Logger;
-import org.hornetq.utils.UUIDGenerator;
-
-/**
- * A DivertConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 13 Jan 2009 09:36:19
- *
- *
- */
-public class DivertConfiguration implements Serializable
-{
-   private static final long serialVersionUID = 6910543740464269629L;
-
-   private static final Logger log = Logger.getLogger(DivertConfiguration.class);
-
-   private String name;
-
-   private String routingName;
-
-   private String address;
-
-   private String forwardingAddress;
-
-   private boolean exclusive;
-
-   private String filterString;
-
-   private String transformerClassName;
-
-   public DivertConfiguration(final String name,
-                              final String routingName,
-                              final String address,
-                              final String forwardingAddress,
-                              final boolean exclusive,
-                              final String filterString,
-                              final String transformerClassName)
-   {
-      this.name = name;
-      if (routingName == null)
-      {
-         this.routingName = UUIDGenerator.getInstance().generateStringUUID();
-      }
-      else
-      {
-         this.routingName = routingName;
-      }
-      this.address = address;
-      this.forwardingAddress = forwardingAddress;
-      this.exclusive = exclusive;
-      this.filterString = filterString;
-      this.transformerClassName = transformerClassName;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getRoutingName()
-   {
-      return routingName;
-   }
-
-   public String getAddress()
-   {
-      return address;
-   }
-
-   public String getForwardingAddress()
-   {
-      return forwardingAddress;
-   }
-
-   public boolean isExclusive()
-   {
-      return exclusive;
-   }
-
-   public String getFilterString()
-   {
-      return filterString;
-   }
-
-   public String getTransformerClassName()
-   {
-      return transformerClassName;
-   }
-
-   /**
-    * @param name the name to set
-    */
-   public void setName(final String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * @param routingName the routingName to set
-    */
-   public void setRoutingName(final String routingName)
-   {
-      this.routingName = routingName;
-   }
-
-   /**
-    * @param address the address to set
-    */
-   public void setAddress(final String address)
-   {
-      this.address = address;
-   }
-
-   /**
-    * @param forwardingAddress the forwardingAddress to set
-    */
-   public void setForwardingAddress(final String forwardingAddress)
-   {
-      this.forwardingAddress = forwardingAddress;
-   }
-
-   /**
-    * @param exclusive the exclusive to set
-    */
-   public void setExclusive(final boolean exclusive)
-   {
-      this.exclusive = exclusive;
-   }
-
-   /**
-    * @param filterString the filterString to set
-    */
-   public void setFilterString(final String filterString)
-   {
-      this.filterString = filterString;
-   }
-
-   /**
-    * @param transformerClassName the transformerClassName to set
-    */
-   public void setTransformerClassName(final String transformerClassName)
-   {
-      this.transformerClassName = transformerClassName;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java (from rev 8663, trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/DivertConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,164 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+
+import org.hornetq.core.logging.Logger;
+import org.hornetq.utils.UUIDGenerator;
+
+/**
+ * A DivertConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 13 Jan 2009 09:36:19
+ *
+ *
+ */
+public class DivertConfiguration implements Serializable
+{
+   private static final long serialVersionUID = 6910543740464269629L;
+
+   private static final Logger log = Logger.getLogger(DivertConfiguration.class);
+
+   private String name;
+
+   private String routingName;
+
+   private String address;
+
+   private String forwardingAddress;
+
+   private boolean exclusive;
+
+   private String filterString;
+
+   private String transformerClassName;
+
+   public DivertConfiguration(final String name,
+                              final String routingName,
+                              final String address,
+                              final String forwardingAddress,
+                              final boolean exclusive,
+                              final String filterString,
+                              final String transformerClassName)
+   {
+      this.name = name;
+      if (routingName == null)
+      {
+         this.routingName = UUIDGenerator.getInstance().generateStringUUID();
+      }
+      else
+      {
+         this.routingName = routingName;
+      }
+      this.address = address;
+      this.forwardingAddress = forwardingAddress;
+      this.exclusive = exclusive;
+      this.filterString = filterString;
+      this.transformerClassName = transformerClassName;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getRoutingName()
+   {
+      return routingName;
+   }
+
+   public String getAddress()
+   {
+      return address;
+   }
+
+   public String getForwardingAddress()
+   {
+      return forwardingAddress;
+   }
+
+   public boolean isExclusive()
+   {
+      return exclusive;
+   }
+
+   public String getFilterString()
+   {
+      return filterString;
+   }
+
+   public String getTransformerClassName()
+   {
+      return transformerClassName;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(final String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @param routingName the routingName to set
+    */
+   public void setRoutingName(final String routingName)
+   {
+      this.routingName = routingName;
+   }
+
+   /**
+    * @param address the address to set
+    */
+   public void setAddress(final String address)
+   {
+      this.address = address;
+   }
+
+   /**
+    * @param forwardingAddress the forwardingAddress to set
+    */
+   public void setForwardingAddress(final String forwardingAddress)
+   {
+      this.forwardingAddress = forwardingAddress;
+   }
+
+   /**
+    * @param exclusive the exclusive to set
+    */
+   public void setExclusive(final boolean exclusive)
+   {
+      this.exclusive = exclusive;
+   }
+
+   /**
+    * @param filterString the filterString to set
+    */
+   public void setFilterString(final String filterString)
+   {
+      this.filterString = filterString;
+   }
+
+   /**
+    * @param transformerClassName the transformerClassName to set
+    */
+   public void setTransformerClassName(final String transformerClassName)
+   {
+      this.transformerClassName = transformerClassName;
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,98 +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.core.config.cluster;
-
-import java.io.Serializable;
-
-/**
- * A QueueConfiguration
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * 
- * Created 13 Jan 2009 09:39:21
- *
- *
- */
-public class QueueConfiguration implements Serializable
-{
-   private static final long serialVersionUID = 650404974977490254L;
-
-   private String address;
-
-   private String name;
-
-   private String filterString;
-
-   private boolean durable;
-
-   public QueueConfiguration(final String address, final String name, final String filterString, final boolean durable)
-   {
-      this.address = address;
-      this.name = name;
-      this.filterString = filterString;
-      this.durable = durable;
-   }
-
-   public String getAddress()
-   {
-      return address;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getFilterString()
-   {
-      return filterString;
-   }
-
-   public boolean isDurable()
-   {
-      return durable;
-   }
-
-   /**
-    * @param address the address to set
-    */
-   public void setAddress(final String address)
-   {
-      this.address = address;
-   }
-
-   /**
-    * @param name the name to set
-    */
-   public void setName(final String name)
-   {
-      this.name = name;
-   }
-
-   /**
-    * @param filterString the filterString to set
-    */
-   public void setFilterString(final String filterString)
-   {
-      this.filterString = filterString;
-   }
-
-   /**
-    * @param durable the durable to set
-    */
-   public void setDurable(final boolean durable)
-   {
-      this.durable = durable;
-   }
-}

Copied: trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java (from rev 8663, trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/core/config/cluster/QueueConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,98 @@
+/*
+ * 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.core.config.cluster;
+
+import java.io.Serializable;
+
+/**
+ * A QueueConfiguration
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * 
+ * Created 13 Jan 2009 09:39:21
+ *
+ *
+ */
+public class QueueConfiguration implements Serializable
+{
+   private static final long serialVersionUID = 650404974977490254L;
+
+   private String address;
+
+   private String name;
+
+   private String filterString;
+
+   private boolean durable;
+
+   public QueueConfiguration(final String address, final String name, final String filterString, final boolean durable)
+   {
+      this.address = address;
+      this.name = name;
+      this.filterString = filterString;
+      this.durable = durable;
+   }
+
+   public String getAddress()
+   {
+      return address;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getFilterString()
+   {
+      return filterString;
+   }
+
+   public boolean isDurable()
+   {
+      return durable;
+   }
+
+   /**
+    * @param address the address to set
+    */
+   public void setAddress(final String address)
+   {
+      this.address = address;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(final String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @param filterString the filterString to set
+    */
+   public void setFilterString(final String filterString)
+   {
+      this.filterString = filterString;
+   }
+
+   /**
+    * @param durable the durable to set
+    */
+   public void setDurable(final boolean durable)
+   {
+      this.durable = durable;
+   }
+}

Deleted: trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,1279 +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.core.config.impl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.hornetq.SimpleString;
-import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.cluster.BridgeConfiguration;
-import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
-import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
-import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
-import org.hornetq.core.config.cluster.DivertConfiguration;
-import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.logging.impl.JULLogDelegateFactory;
-import org.hornetq.core.server.JournalType;
-import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
-
-/**
- * @author <a href="mailto:ataylor at redhat.com>Andy Taylor</a>
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- */
-public class ConfigurationImpl implements Configuration
-{
-   // Constants ------------------------------------------------------------------------------
-
-   private static final long serialVersionUID = 4077088945050267843L;
-
-   public static final boolean DEFAULT_CLUSTERED = false;
-
-   public static final boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false;
-
-   public static final boolean DEFAULT_BACKUP = false;
-
-   public static final boolean DEFAULT_SHARED_STORE = false;
-
-   public static final boolean DEFAULT_FILE_DEPLOYMENT_ENABLED = false;
-
-   public static final boolean DEFAULT_PERSISTENCE_ENABLED = true;
-
-   public static final long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000;
-
-   public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 5;
-
-   public static final int DEFAULT_THREAD_POOL_MAX_SIZE = -1;
-
-   public static final long DEFAULT_SECURITY_INVALIDATION_INTERVAL = 10000;
-
-   public static final boolean DEFAULT_SECURITY_ENABLED = true;
-
-   public static final boolean DEFAULT_JMX_MANAGEMENT_ENABLED = true;
-
-   public static final String DEFAULT_JMX_DOMAIN = "org.hornetq";
-
-   public static final long DEFAULT_CONNECTION_TTL_OVERRIDE = -1;
-
-   public static final boolean DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED = false;
-
-   public static final String DEFAULT_BINDINGS_DIRECTORY = "data/bindings";
-
-   public static final boolean DEFAULT_CREATE_BINDINGS_DIR = true;
-
-   public static final String DEFAULT_JOURNAL_DIR = "data/journal";
-
-   public static final String DEFAULT_PAGING_DIR = "data/paging";
-
-   public static final String DEFAULT_LARGE_MESSAGES_DIR = "data/largemessages";
-
-   public static final boolean DEFAULT_CREATE_JOURNAL_DIR = true;
-
-   public static final JournalType DEFAULT_JOURNAL_TYPE = JournalType.ASYNCIO;
-
-   public static final boolean DEFAULT_JOURNAL_SYNC_TRANSACTIONAL = true;
-
-   public static final boolean DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL = true;
-
-   public static final int DEFAULT_JOURNAL_FILE_SIZE = 10485760;
-
-   public static final int DEFAULT_JOURNAL_COMPACT_MIN_FILES = 10;
-
-   public static final int DEFAULT_JOURNAL_COMPACT_PERCENTAGE = 30;
-
-   public static final int DEFAULT_JOURNAL_MIN_FILES = 2;
-
-   // AIO and NIO need to have different defaults for some values
-
-   public static final int DEFAULT_JOURNAL_MAX_IO_AIO = 500;
-
-   public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO = (int)(1000000000d / 2000);
-
-   public static final int DEFAULT_JOURNAL_BUFFER_SIZE_AIO = 490 * 1024;
-
-   public static final int DEFAULT_JOURNAL_MAX_IO_NIO = 1;
-
-   public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = (int)(1000000000d / 300);
-
-   public static final int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = 490 * 1024;
-
-   public static final boolean DEFAULT_JOURNAL_LOG_WRITE_RATE = false;
-
-   public static final int DEFAULT_JOURNAL_PERF_BLAST_PAGES = -1;
-
-   public static final boolean DEFAULT_RUN_SYNC_SPEED_TEST = false;
-
-   public static final boolean DEFAULT_WILDCARD_ROUTING_ENABLED = true;
-
-   public static final boolean DEFAULT_MESSAGE_COUNTER_ENABLED = false;
-
-   public static final long DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD = 10000;
-
-   public static final int DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY = 10;
-
-   public static final long DEFAULT_TRANSACTION_TIMEOUT = 300000; // 5 minutes
-
-   public static final long DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD = 1000;
-
-   public static final SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("hornetq.management");
-
-   public static final SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("hornetq.notifications");
-
-   public static final String DEFAULT_MANAGEMENT_CLUSTER_USER = "HORNETQ.MANAGEMENT.ADMIN.USER";
-
-   public static final String DEFAULT_MANAGEMENT_CLUSTER_PASSWORD = "CHANGE ME!!";
-
-   public static final long DEFAULT_BROADCAST_PERIOD = 1000;
-
-   public static final long DEFAULT_BROADCAST_REFRESH_TIMEOUT = 10000;
-
-   public static final long DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD = 30000;
-
-   public static final int DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY = 3;
-
-   public static final int DEFAULT_ID_CACHE_SIZE = 2000;
-
-   public static final boolean DEFAULT_PERSIST_ID_CACHE = true;
-
-   public static final boolean DEFAULT_CLUSTER_DUPLICATE_DETECTION = true;
-
-   public static final boolean DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS = false;
-
-   public static final int DEFAULT_CLUSTER_MAX_HOPS = 1;
-
-   public static final long DEFAULT_CLUSTER_RETRY_INTERVAL = 500;
-
-   public static final boolean DEFAULT_DIVERT_EXCLUSIVE = false;
-
-   public static final boolean DEFAULT_BRIDGE_DUPLICATE_DETECTION = true;
-
-   public static final int DEFAULT_BRIDGE_RECONNECT_ATTEMPTS = -1;
-
-   public static final long DEFAULT_SERVER_DUMP_INTERVAL = -1;
-
-   public static final int DEFAULT_MEMORY_WARNING_THRESHOLD = 25;
-
-   public static final long DEFAULT_MEMORY_MEASURE_INTERVAL = -1; // in milliseconds
-
-   public static final String DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME = JULLogDelegateFactory.class.getCanonicalName();
-
-   // Attributes -----------------------------------------------------------------------------
-
-   protected boolean clustered = ConfigurationImpl.DEFAULT_CLUSTERED;
-
-   protected boolean backup = ConfigurationImpl.DEFAULT_BACKUP;
-
-   protected boolean sharedStore = ConfigurationImpl.DEFAULT_SHARED_STORE;
-
-   protected boolean fileDeploymentEnabled = ConfigurationImpl.DEFAULT_FILE_DEPLOYMENT_ENABLED;
-
-   protected boolean persistenceEnabled = ConfigurationImpl.DEFAULT_PERSISTENCE_ENABLED;
-
-   protected long fileDeploymentScanPeriod = ConfigurationImpl.DEFAULT_FILE_DEPLOYER_SCAN_PERIOD;
-
-   protected boolean persistDeliveryCountBeforeDelivery = ConfigurationImpl.DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY;
-
-   protected int scheduledThreadPoolMaxSize = ConfigurationImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
-
-   protected int threadPoolMaxSize = ConfigurationImpl.DEFAULT_THREAD_POOL_MAX_SIZE;
-
-   protected long securityInvalidationInterval = ConfigurationImpl.DEFAULT_SECURITY_INVALIDATION_INTERVAL;
-
-   protected boolean securityEnabled = ConfigurationImpl.DEFAULT_SECURITY_ENABLED;
-
-   protected boolean jmxManagementEnabled = ConfigurationImpl.DEFAULT_JMX_MANAGEMENT_ENABLED;
-
-   protected String jmxDomain = ConfigurationImpl.DEFAULT_JMX_DOMAIN;
-
-   protected long connectionTTLOverride = ConfigurationImpl.DEFAULT_CONNECTION_TTL_OVERRIDE;
-
-   protected boolean asyncConnectionExecutionEnabled = ConfigurationImpl.DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED;
-
-   protected long messageExpiryScanPeriod = ConfigurationImpl.DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD;
-
-   protected int messageExpiryThreadPriority = ConfigurationImpl.DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY;
-
-   protected int idCacheSize = ConfigurationImpl.DEFAULT_ID_CACHE_SIZE;
-
-   protected boolean persistIDCache = ConfigurationImpl.DEFAULT_PERSIST_ID_CACHE;
-
-   protected String logDelegateFactoryClassName = ConfigurationImpl.DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME;
-
-   protected List<String> interceptorClassNames = new ArrayList<String>();
-
-   protected Map<String, TransportConfiguration> connectorConfigs = new HashMap<String, TransportConfiguration>();
-
-   protected Set<TransportConfiguration> acceptorConfigs = new HashSet<TransportConfiguration>();
-
-   protected String backupConnectorName;
-
-   protected List<BridgeConfiguration> bridgeConfigurations = new ArrayList<BridgeConfiguration>();
-
-   protected List<DivertConfiguration> divertConfigurations = new ArrayList<DivertConfiguration>();
-
-   protected List<ClusterConnectionConfiguration> clusterConfigurations = new ArrayList<ClusterConnectionConfiguration>();
-
-   protected List<QueueConfiguration> queueConfigurations = new ArrayList<QueueConfiguration>();
-
-   protected List<BroadcastGroupConfiguration> broadcastGroupConfigurations = new ArrayList<BroadcastGroupConfiguration>();
-
-   protected Map<String, DiscoveryGroupConfiguration> discoveryGroupConfigurations = new LinkedHashMap<String, DiscoveryGroupConfiguration>();
-
-   // Paging related attributes ------------------------------------------------------------
-
-   protected String pagingDirectory = ConfigurationImpl.DEFAULT_PAGING_DIR;
-
-   // File related attributes -----------------------------------------------------------
-
-   protected String largeMessagesDirectory = ConfigurationImpl.DEFAULT_LARGE_MESSAGES_DIR;
-
-   protected String bindingsDirectory = ConfigurationImpl.DEFAULT_BINDINGS_DIRECTORY;
-
-   protected boolean createBindingsDir = ConfigurationImpl.DEFAULT_CREATE_BINDINGS_DIR;
-
-   protected String journalDirectory = ConfigurationImpl.DEFAULT_JOURNAL_DIR;
-
-   protected boolean createJournalDir = ConfigurationImpl.DEFAULT_CREATE_JOURNAL_DIR;
-
-   public JournalType journalType = ConfigurationImpl.DEFAULT_JOURNAL_TYPE;
-
-   protected boolean journalSyncTransactional = ConfigurationImpl.DEFAULT_JOURNAL_SYNC_TRANSACTIONAL;
-
-   protected boolean journalSyncNonTransactional = ConfigurationImpl.DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL;
-
-   protected int journalCompactMinFiles = ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_MIN_FILES;
-
-   protected int journalCompactPercentage = ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_PERCENTAGE;
-
-   protected int journalFileSize = ConfigurationImpl.DEFAULT_JOURNAL_FILE_SIZE;
-
-   protected int journalMinFiles = ConfigurationImpl.DEFAULT_JOURNAL_MIN_FILES;
-
-   // AIO and NIO need different values for these attributes
-
-   protected int journalMaxIO_AIO = ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO;
-
-   protected int journalBufferTimeout_AIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO;
-
-   protected int journalBufferSize_AIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO;
-
-   protected int journalMaxIO_NIO = ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO;
-
-   protected int journalBufferTimeout_NIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO;
-
-   protected int journalBufferSize_NIO = ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO;
-
-   protected boolean logJournalWriteRate = ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE;
-
-   protected int journalPerfBlastPages = ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES;
-
-   protected boolean runSyncSpeedTest = ConfigurationImpl.DEFAULT_RUN_SYNC_SPEED_TEST;
-
-   protected boolean wildcardRoutingEnabled = ConfigurationImpl.DEFAULT_WILDCARD_ROUTING_ENABLED;
-
-   protected boolean messageCounterEnabled = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_ENABLED;
-
-   protected long messageCounterSamplePeriod = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD;
-
-   protected int messageCounterMaxDayHistory = ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY;
-
-   protected long transactionTimeout = ConfigurationImpl.DEFAULT_TRANSACTION_TIMEOUT;
-
-   protected long transactionTimeoutScanPeriod = ConfigurationImpl.DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD;
-
-   protected SimpleString managementAddress = ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS;
-
-   protected SimpleString managementNotificationAddress = ConfigurationImpl.DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS;
-
-   protected String managementClusterUser = ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_USER;
-
-   protected String managementClusterPassword = ConfigurationImpl.DEFAULT_MANAGEMENT_CLUSTER_PASSWORD;
-
-   protected long serverDumpInterval = ConfigurationImpl.DEFAULT_SERVER_DUMP_INTERVAL;
-
-   // percentage of free memory which triggers warning from the memory manager
-   protected int memoryWarningThreshold = ConfigurationImpl.DEFAULT_MEMORY_WARNING_THRESHOLD;
-
-   protected long memoryMeasureInterval = ConfigurationImpl.DEFAULT_MEMORY_MEASURE_INTERVAL;
-
-   protected GroupingHandlerConfiguration groupingHandlerConfiguration;
-
-   // Public -------------------------------------------------------------------------
-
-   public boolean isClustered()
-   {
-      return clustered;
-   }
-
-   public void setClustered(final boolean clustered)
-   {
-      this.clustered = clustered;
-   }
-
-   public boolean isBackup()
-   {
-      return backup;
-   }
-
-   public boolean isFileDeploymentEnabled()
-   {
-      return fileDeploymentEnabled;
-   }
-
-   public void setFileDeploymentEnabled(final boolean enable)
-   {
-      fileDeploymentEnabled = enable;
-   }
-
-   public boolean isPersistenceEnabled()
-   {
-      return persistenceEnabled;
-   }
-
-   public void setPersistenceEnabled(final boolean enable)
-   {
-      persistenceEnabled = enable;
-   }
-
-   public long getFileDeployerScanPeriod()
-   {
-      return fileDeploymentScanPeriod;
-   }
-
-   public void setFileDeployerScanPeriod(final long period)
-   {
-      fileDeploymentScanPeriod = period;
-   }
-
-   /**
-    * @return the persistDeliveryCountBeforeDelivery
-    */
-   public boolean isPersistDeliveryCountBeforeDelivery()
-   {
-      return persistDeliveryCountBeforeDelivery;
-   }
-
-   public void setPersistDeliveryCountBeforeDelivery(final boolean persistDeliveryCountBeforeDelivery)
-   {
-      this.persistDeliveryCountBeforeDelivery = persistDeliveryCountBeforeDelivery;
-   }
-
-   public void setBackup(final boolean backup)
-   {
-      this.backup = backup;
-   }
-
-   public boolean isSharedStore()
-   {
-      return sharedStore;
-   }
-
-   public void setSharedStore(final boolean sharedStore)
-   {
-      this.sharedStore = sharedStore;
-   }
-
-   public int getScheduledThreadPoolMaxSize()
-   {
-      return scheduledThreadPoolMaxSize;
-   }
-
-   public void setScheduledThreadPoolMaxSize(final int maxSize)
-   {
-      scheduledThreadPoolMaxSize = maxSize;
-   }
-
-   public int getThreadPoolMaxSize()
-   {
-      return threadPoolMaxSize;
-   }
-
-   public void setThreadPoolMaxSize(final int maxSize)
-   {
-      threadPoolMaxSize = maxSize;
-   }
-
-   public long getSecurityInvalidationInterval()
-   {
-      return securityInvalidationInterval;
-   }
-
-   public void setSecurityInvalidationInterval(final long interval)
-   {
-      securityInvalidationInterval = interval;
-   }
-
-   public long getConnectionTTLOverride()
-   {
-      return connectionTTLOverride;
-   }
-
-   public void setConnectionTTLOverride(final long ttl)
-   {
-      connectionTTLOverride = ttl;
-   }
-
-   public boolean isAsyncConnectionExecutionEnabled()
-   {
-      return asyncConnectionExecutionEnabled;
-   }
-
-   public void setEnabledAsyncConnectionExecution(final boolean enabled)
-   {
-      asyncConnectionExecutionEnabled = enabled;
-   }
-
-   public List<String> getInterceptorClassNames()
-   {
-      return interceptorClassNames;
-   }
-
-   public void setInterceptorClassNames(final List<String> interceptors)
-   {
-      interceptorClassNames = interceptors;
-   }
-
-   public Set<TransportConfiguration> getAcceptorConfigurations()
-   {
-      return acceptorConfigs;
-   }
-
-   public void setAcceptorConfigurations(final Set<TransportConfiguration> infos)
-   {
-      acceptorConfigs = infos;
-   }
-
-   public Map<String, TransportConfiguration> getConnectorConfigurations()
-   {
-      return connectorConfigs;
-   }
-
-   public void setConnectorConfigurations(final Map<String, TransportConfiguration> infos)
-   {
-      connectorConfigs = infos;
-   }
-
-   public String getBackupConnectorName()
-   {
-      return backupConnectorName;
-   }
-
-   public void setBackupConnectorName(final String backupConnectorName)
-   {
-      this.backupConnectorName = backupConnectorName;
-   }
-
-   public GroupingHandlerConfiguration getGroupingHandlerConfiguration()
-   {
-      return groupingHandlerConfiguration;
-   }
-
-   public void setGroupingHandlerConfiguration(final GroupingHandlerConfiguration groupingHandlerConfiguration)
-   {
-      this.groupingHandlerConfiguration = groupingHandlerConfiguration;
-   }
-
-   public List<BridgeConfiguration> getBridgeConfigurations()
-   {
-      return bridgeConfigurations;
-   }
-
-   public void setBridgeConfigurations(final List<BridgeConfiguration> configs)
-   {
-      bridgeConfigurations = configs;
-   }
-
-   public List<BroadcastGroupConfiguration> getBroadcastGroupConfigurations()
-   {
-      return broadcastGroupConfigurations;
-   }
-
-   public void setBroadcastGroupConfigurations(final List<BroadcastGroupConfiguration> configs)
-   {
-      broadcastGroupConfigurations = configs;
-   }
-
-   public List<ClusterConnectionConfiguration> getClusterConfigurations()
-   {
-      return clusterConfigurations;
-   }
-
-   public void setClusterConfigurations(final List<ClusterConnectionConfiguration> configs)
-   {
-      clusterConfigurations = configs;
-   }
-
-   public List<DivertConfiguration> getDivertConfigurations()
-   {
-      return divertConfigurations;
-   }
-
-   public void setDivertConfigurations(final List<DivertConfiguration> configs)
-   {
-      divertConfigurations = configs;
-   }
-
-   public List<QueueConfiguration> getQueueConfigurations()
-   {
-      return queueConfigurations;
-   }
-
-   public void setQueueConfigurations(final List<QueueConfiguration> configs)
-   {
-      queueConfigurations = configs;
-   }
-
-   public Map<String, DiscoveryGroupConfiguration> getDiscoveryGroupConfigurations()
-   {
-      return discoveryGroupConfigurations;
-   }
-
-   public void setDiscoveryGroupConfigurations(final Map<String, DiscoveryGroupConfiguration> discoveryGroupConfigurations)
-   {
-      this.discoveryGroupConfigurations = discoveryGroupConfigurations;
-   }
-
-   public int getIDCacheSize()
-   {
-      return idCacheSize;
-   }
-
-   public void setIDCacheSize(final int idCacheSize)
-   {
-      this.idCacheSize = idCacheSize;
-   }
-
-   public boolean isPersistIDCache()
-   {
-      return persistIDCache;
-   }
-
-   public void setPersistIDCache(final boolean persist)
-   {
-      persistIDCache = persist;
-   }
-
-   public String getBindingsDirectory()
-   {
-      return bindingsDirectory;
-   }
-
-   public void setBindingsDirectory(final String dir)
-   {
-      bindingsDirectory = dir;
-   }
-
-   public String getJournalDirectory()
-   {
-      return journalDirectory;
-   }
-
-   public void setJournalDirectory(final String dir)
-   {
-      journalDirectory = dir;
-   }
-
-   public JournalType getJournalType()
-   {
-      return journalType;
-   }
-
-   public void setPagingDirectory(final String dir)
-   {
-      pagingDirectory = dir;
-   }
-
-   public String getPagingDirectory()
-   {
-      return pagingDirectory;
-   }
-
-   public void setJournalType(final JournalType type)
-   {
-      journalType = type;
-   }
-
-   public boolean isJournalSyncTransactional()
-   {
-      return journalSyncTransactional;
-   }
-
-   public void setJournalSyncTransactional(final boolean sync)
-   {
-      journalSyncTransactional = sync;
-   }
-
-   public boolean isJournalSyncNonTransactional()
-   {
-      return journalSyncNonTransactional;
-   }
-
-   public void setJournalSyncNonTransactional(final boolean sync)
-   {
-      journalSyncNonTransactional = sync;
-   }
-
-   public int getJournalFileSize()
-   {
-      return journalFileSize;
-   }
-
-   public void setJournalFileSize(final int size)
-   {
-      journalFileSize = size;
-   }
-
-   public int getJournalMinFiles()
-   {
-      return journalMinFiles;
-   }
-
-   public void setJournalMinFiles(final int files)
-   {
-      journalMinFiles = files;
-   }
-
-   public boolean isLogJournalWriteRate()
-   {
-      return logJournalWriteRate;
-   }
-
-   public void setLogJournalWriteRate(final boolean logJournalWriteRate)
-   {
-      this.logJournalWriteRate = logJournalWriteRate;
-   }
-
-   public int getJournalPerfBlastPages()
-   {
-      return journalPerfBlastPages;
-   }
-
-   public void setJournalPerfBlastPages(final int journalPerfBlastPages)
-   {
-      this.journalPerfBlastPages = journalPerfBlastPages;
-   }
-
-   public boolean isRunSyncSpeedTest()
-   {
-      return runSyncSpeedTest;
-   }
-
-   public void setRunSyncSpeedTest(final boolean run)
-   {
-      runSyncSpeedTest = run;
-   }
-
-   public boolean isCreateBindingsDir()
-   {
-      return createBindingsDir;
-   }
-
-   public void setCreateBindingsDir(final boolean create)
-   {
-      createBindingsDir = create;
-   }
-
-   public boolean isCreateJournalDir()
-   {
-      return createJournalDir;
-   }
-
-   public void setCreateJournalDir(final boolean create)
-   {
-      createJournalDir = create;
-   }
-
-   public boolean isWildcardRoutingEnabled()
-   {
-      return wildcardRoutingEnabled;
-   }
-
-   public void setWildcardRoutingEnabled(final boolean enabled)
-   {
-      wildcardRoutingEnabled = enabled;
-   }
-
-   public long getTransactionTimeout()
-   {
-      return transactionTimeout;
-   }
-
-   public void setTransactionTimeout(final long timeout)
-   {
-      transactionTimeout = timeout;
-   }
-
-   public long getTransactionTimeoutScanPeriod()
-   {
-      return transactionTimeoutScanPeriod;
-   }
-
-   public void setTransactionTimeoutScanPeriod(final long period)
-   {
-      transactionTimeoutScanPeriod = period;
-   }
-
-   public long getMessageExpiryScanPeriod()
-   {
-      return messageExpiryScanPeriod;
-   }
-
-   public void setMessageExpiryScanPeriod(final long messageExpiryScanPeriod)
-   {
-      this.messageExpiryScanPeriod = messageExpiryScanPeriod;
-   }
-
-   public int getMessageExpiryThreadPriority()
-   {
-      return messageExpiryThreadPriority;
-   }
-
-   public void setMessageExpiryThreadPriority(final int messageExpiryThreadPriority)
-   {
-      this.messageExpiryThreadPriority = messageExpiryThreadPriority;
-   }
-
-   public boolean isSecurityEnabled()
-   {
-      return securityEnabled;
-   }
-
-   public void setSecurityEnabled(final boolean enabled)
-   {
-      securityEnabled = enabled;
-   }
-
-   public boolean isJMXManagementEnabled()
-   {
-      return jmxManagementEnabled;
-   }
-
-   public void setJMXManagementEnabled(final boolean enabled)
-   {
-      jmxManagementEnabled = enabled;
-   }
-
-   public String getJMXDomain()
-   {
-      return jmxDomain;
-   }
-
-   public void setJMXDomain(final String domain)
-   {
-      jmxDomain = domain;
-   }
-
-   public String getLargeMessagesDirectory()
-   {
-      return largeMessagesDirectory;
-   }
-
-   public void setLargeMessagesDirectory(final String directory)
-   {
-      largeMessagesDirectory = directory;
-   }
-
-   public boolean isMessageCounterEnabled()
-   {
-      return messageCounterEnabled;
-   }
-
-   public void setMessageCounterEnabled(final boolean enabled)
-   {
-      messageCounterEnabled = enabled;
-   }
-
-   public long getMessageCounterSamplePeriod()
-   {
-      return messageCounterSamplePeriod;
-   }
-   
-   public void setMessageCounterSamplePeriod(long period)
-   {
-      this.messageCounterSamplePeriod = period;
-   }
-
-   public int getMessageCounterMaxDayHistory()
-   {
-      return messageCounterMaxDayHistory;
-   }
-
-   public void setMessageCounterMaxDayHistory(final int maxDayHistory)
-   {
-      messageCounterMaxDayHistory = maxDayHistory;
-   }
-
-   public SimpleString getManagementAddress()
-   {
-      return managementAddress;
-   }
-
-   public void setManagementAddress(final SimpleString address)
-   {
-      managementAddress = address;
-   }
-
-   public SimpleString getManagementNotificationAddress()
-   {
-      return managementNotificationAddress;
-   }
-
-   public void setManagementNotificationAddress(final SimpleString address)
-   {
-      managementNotificationAddress = address;
-   }
-
-   public String getManagementClusterUser()
-   {
-      return managementClusterUser;
-   }
-
-   public void setManagementClusterUser(final String user)
-   {
-      managementClusterUser = user;
-   }
-
-   public String getManagementClusterPassword()
-   {
-      return managementClusterPassword;
-   }
-
-   public void setManagementClusterPassword(final String clusterPassword)
-   {
-      managementClusterPassword = clusterPassword;
-   }
-
-   public int getJournalCompactMinFiles()
-   {
-      return journalCompactMinFiles;
-   }
-
-   public int getJournalCompactPercentage()
-   {
-      return journalCompactPercentage;
-   }
-
-   public void setJournalCompactMinFiles(final int minFiles)
-   {
-      journalCompactMinFiles = minFiles;
-   }
-
-   public void setJournalCompactPercentage(final int percentage)
-   {
-      journalCompactPercentage = percentage;
-   }
-
-   public long getServerDumpInterval()
-   {
-      return serverDumpInterval;
-   }
-
-   public void setServerDumpInterval(final long intervalInMilliseconds)
-   {
-      serverDumpInterval = intervalInMilliseconds;
-   }
-
-   public int getMemoryWarningThreshold()
-   {
-      return memoryWarningThreshold;
-   }
-
-   public void setMemoryWarningThreshold(final int memoryWarningThreshold)
-   {
-      this.memoryWarningThreshold = memoryWarningThreshold;
-   }
-
-   public long getMemoryMeasureInterval()
-   {
-      return memoryMeasureInterval;
-   }
-
-   public void setMemoryMeasureInterval(final long memoryMeasureInterval)
-   {
-      this.memoryMeasureInterval = memoryMeasureInterval;
-   }
-
-   public String getLogDelegateFactoryClassName()
-   {
-      return logDelegateFactoryClassName;
-   }
-
-   public void setLogDelegateFactoryClassName(final String className)
-   {
-      logDelegateFactoryClassName = className;
-   }
-
-   public int getJournalMaxIO_AIO()
-   {
-      return journalMaxIO_AIO;
-   }
-
-   public void setJournalMaxIO_AIO(final int journalMaxIO)
-   {
-      journalMaxIO_AIO = journalMaxIO;
-   }
-
-   public int getJournalBufferTimeout_AIO()
-   {
-      return journalBufferTimeout_AIO;
-   }
-
-   public void setJournalBufferTimeout_AIO(final int journalBufferTimeout)
-   {
-      journalBufferTimeout_AIO = journalBufferTimeout;
-   }
-
-   public int getJournalBufferSize_AIO()
-   {
-      return journalBufferSize_AIO;
-   }
-
-   public void setJournalBufferSize_AIO(final int journalBufferSize)
-   {
-      journalBufferSize_AIO = journalBufferSize;
-   }
-
-   public int getJournalMaxIO_NIO()
-   {
-      return journalMaxIO_NIO;
-   }
-
-   public void setJournalMaxIO_NIO(final int journalMaxIO)
-   {
-      journalMaxIO_NIO = journalMaxIO;
-   }
-
-   public int getJournalBufferTimeout_NIO()
-   {
-      return journalBufferTimeout_NIO;
-   }
-
-   public void setJournalBufferTimeout_NIO(final int journalBufferTimeout)
-   {
-      journalBufferTimeout_NIO = journalBufferTimeout;
-   }
-
-   public int getJournalBufferSize_NIO()
-   {
-      return journalBufferSize_NIO;
-   }
-
-   public void setJournalBufferSize_NIO(final int journalBufferSize)
-   {
-      journalBufferSize_NIO = journalBufferSize;
-   }
-
-   @Override
-   public boolean equals(final Object obj)
-   {
-      if (this == obj)
-      {
-         return true;
-      }
-      if (obj == null)
-      {
-         return false;
-      }
-      if (getClass() != obj.getClass())
-      {
-         return false;
-      }
-      ConfigurationImpl other = (ConfigurationImpl)obj;
-      if (asyncConnectionExecutionEnabled != other.asyncConnectionExecutionEnabled)
-      {
-         return false;
-      }
-      if (backup != other.backup)
-      {
-         return false;
-      }
-      if (sharedStore != other.sharedStore)
-      {
-         return false;
-      }
-      if (backupConnectorName == null)
-      {
-         if (other.backupConnectorName != null)
-         {
-            return false;
-         }
-      }
-      else if (!backupConnectorName.equals(other.backupConnectorName))
-      {
-         return false;
-      }
-      if (bindingsDirectory == null)
-      {
-         if (other.bindingsDirectory != null)
-         {
-            return false;
-         }
-      }
-      else if (!bindingsDirectory.equals(other.bindingsDirectory))
-      {
-         return false;
-      }
-
-      if (clustered != other.clustered)
-      {
-         return false;
-      }
-      if (connectionTTLOverride != other.connectionTTLOverride)
-      {
-         return false;
-      }
-      if (createBindingsDir != other.createBindingsDir)
-      {
-         return false;
-      }
-      if (createJournalDir != other.createJournalDir)
-      {
-         return false;
-      }
-
-      if (fileDeploymentEnabled != other.fileDeploymentEnabled)
-      {
-         return false;
-      }
-      if (fileDeploymentScanPeriod != other.fileDeploymentScanPeriod)
-      {
-         return false;
-      }
-      if (idCacheSize != other.idCacheSize)
-      {
-         return false;
-      }
-      if (jmxManagementEnabled != other.jmxManagementEnabled)
-      {
-         return false;
-      }
-      if (journalBufferSize_AIO != other.journalBufferSize_AIO)
-      {
-         return false;
-      }
-      if (journalBufferTimeout_AIO != other.journalBufferTimeout_AIO)
-      {
-         return false;
-      }
-      if (journalMaxIO_AIO != other.journalMaxIO_AIO)
-      {
-         return false;
-      }
-      if (journalBufferSize_NIO != other.journalBufferSize_NIO)
-      {
-         return false;
-      }
-      if (journalBufferTimeout_NIO != other.journalBufferTimeout_NIO)
-      {
-         return false;
-      }
-      if (journalMaxIO_NIO != other.journalMaxIO_NIO)
-      {
-         return false;
-      }
-      if (journalCompactMinFiles != other.journalCompactMinFiles)
-      {
-         return false;
-      }
-      if (journalCompactPercentage != other.journalCompactPercentage)
-      {
-         return false;
-      }
-      if (journalDirectory == null)
-      {
-         if (other.journalDirectory != null)
-         {
-            return false;
-         }
-      }
-      else if (!journalDirectory.equals(other.journalDirectory))
-      {
-         return false;
-      }
-      if (journalFileSize != other.journalFileSize)
-      {
-         return false;
-      }
-
-      if (journalMinFiles != other.journalMinFiles)
-      {
-         return false;
-      }
-      if (journalPerfBlastPages != other.journalPerfBlastPages)
-      {
-         return false;
-      }
-      if (journalSyncNonTransactional != other.journalSyncNonTransactional)
-      {
-         return false;
-      }
-      if (journalSyncTransactional != other.journalSyncTransactional)
-      {
-         return false;
-      }
-      if (journalType == null)
-      {
-         if (other.journalType != null)
-         {
-            return false;
-         }
-      }
-      else if (!journalType.equals(other.journalType))
-      {
-         return false;
-      }
-      if (largeMessagesDirectory == null)
-      {
-         if (other.largeMessagesDirectory != null)
-         {
-            return false;
-         }
-      }
-      else if (!largeMessagesDirectory.equals(other.largeMessagesDirectory))
-      {
-         return false;
-      }
-      if (logJournalWriteRate != other.logJournalWriteRate)
-      {
-         return false;
-      }
-      if (managementAddress == null)
-      {
-         if (other.managementAddress != null)
-         {
-            return false;
-         }
-      }
-      else if (!managementAddress.equals(other.managementAddress))
-      {
-         return false;
-      }
-      if (managementClusterPassword == null)
-      {
-         if (other.managementClusterPassword != null)
-         {
-            return false;
-         }
-      }
-      else if (!managementClusterPassword.equals(other.managementClusterPassword))
-      {
-         return false;
-      }
-      if (managementClusterUser == null)
-      {
-         if (other.managementClusterUser != null)
-         {
-            return false;
-         }
-      }
-      else if (!managementClusterUser.equals(other.managementClusterUser))
-      {
-         return false;
-      }
-      if (managementNotificationAddress == null)
-      {
-         if (other.managementNotificationAddress != null)
-         {
-            return false;
-         }
-      }
-      else if (!managementNotificationAddress.equals(other.managementNotificationAddress))
-      {
-         return false;
-      }
-      if (messageCounterEnabled != other.messageCounterEnabled)
-      {
-         return false;
-      }
-      if (messageCounterMaxDayHistory != other.messageCounterMaxDayHistory)
-      {
-         return false;
-      }
-      if (messageCounterSamplePeriod != other.messageCounterSamplePeriod)
-      {
-         return false;
-      }
-      if (messageExpiryScanPeriod != other.messageExpiryScanPeriod)
-      {
-         return false;
-      }
-      if (messageExpiryThreadPriority != other.messageExpiryThreadPriority)
-      {
-         return false;
-      }
-      if (pagingDirectory == null)
-      {
-         if (other.pagingDirectory != null)
-         {
-            return false;
-         }
-      }
-      else if (!pagingDirectory.equals(other.pagingDirectory))
-      {
-         return false;
-      }
-      if (persistDeliveryCountBeforeDelivery != other.persistDeliveryCountBeforeDelivery)
-      {
-         return false;
-      }
-      if (persistIDCache != other.persistIDCache)
-      {
-         return false;
-      }
-      if (persistenceEnabled != other.persistenceEnabled)
-      {
-         return false;
-      }
-      if (scheduledThreadPoolMaxSize != other.scheduledThreadPoolMaxSize)
-      {
-         return false;
-      }
-      if (securityEnabled != other.securityEnabled)
-      {
-         return false;
-      }
-      if (securityInvalidationInterval != other.securityInvalidationInterval)
-      {
-         return false;
-      }
-      if (serverDumpInterval != other.serverDumpInterval)
-      {
-         return false;
-      }
-      if (threadPoolMaxSize != other.threadPoolMaxSize)
-      {
-         return false;
-      }
-      if (transactionTimeout != other.transactionTimeout)
-      {
-         return false;
-      }
-      if (transactionTimeoutScanPeriod != other.transactionTimeoutScanPeriod)
-      {
-         return false;
-      }
-      if (wildcardRoutingEnabled != other.wildcardRoutingEnabled)
-      {
-         return false;
-      }
-      return true;
-   }
-
-}

Deleted: trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,847 +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.core.config.impl;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hornetq.Pair;
-import org.hornetq.SimpleString;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
-import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.cluster.BridgeConfiguration;
-import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
-import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
-import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
-import org.hornetq.core.config.cluster.DivertConfiguration;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.core.server.JournalType;
-import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
-import org.hornetq.utils.XMLConfigurationUtil;
-import org.hornetq.utils.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * ConfigurationImpl
- * This class allows the Configuration class to be configured via a config file.
- *
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- * @author <a href="tim.fox at jboss.com">Tim Fox</a>
- */
-public class FileConfiguration extends ConfigurationImpl
-{
-   private static final long serialVersionUID = -4766689627675039596L;
-
-   private static final Logger log = Logger.getLogger(FileConfiguration.class);
-
-   // Constants ------------------------------------------------------------------------
-
-   private static final String DEFAULT_CONFIGURATION_URL = "hornetq-configuration.xml";
-
-   private static final String CONFIGURATION_SCHEMA_URL = "schema/hornetq-configuration.xsd";
-
-   // For a bridge confirmations must be activated or send acknowledgements won't return
-
-   public static final int DEFAULT_CONFIRMATION_WINDOW_SIZE = 1024 * 1024;
-
-   // Static --------------------------------------------------------------------------
-
-   // Attributes ----------------------------------------------------------------------
-
-   private String configurationUrl = FileConfiguration.DEFAULT_CONFIGURATION_URL;
-
-   private boolean started;
-
-   // Public -------------------------------------------------------------------------
-
-   public synchronized void start() throws Exception
-   {
-      if (started)
-      {
-         return;
-      }
-
-      URL url = getClass().getClassLoader().getResource(configurationUrl);
-      FileConfiguration.log.debug("Loading server configuration from " + url);
-
-      Reader reader = new InputStreamReader(url.openStream());
-      String xml = org.hornetq.utils.XMLUtil.readerToString(reader);
-      xml = XMLUtil.replaceSystemProps(xml);
-      Element e = org.hornetq.utils.XMLUtil.stringToElement(xml);
-      org.hornetq.utils.XMLUtil.validate(e, FileConfiguration.CONFIGURATION_SCHEMA_URL);
-
-      clustered = XMLConfigurationUtil.getBoolean(e, "clustered", clustered);
-
-      backup = XMLConfigurationUtil.getBoolean(e, "backup", backup);
-
-      sharedStore = XMLConfigurationUtil.getBoolean(e, "shared-store", sharedStore);
-
-      // Defaults to true when using FileConfiguration
-      fileDeploymentEnabled = XMLConfigurationUtil.getBoolean(e, "file-deployment-enabled", true);
-
-      persistenceEnabled = XMLConfigurationUtil.getBoolean(e, "persistence-enabled", persistenceEnabled);
-
-      persistDeliveryCountBeforeDelivery = XMLConfigurationUtil.getBoolean(e,
-                                                                           "persist-delivery-count-before-delivery",
-                                                                           persistDeliveryCountBeforeDelivery);
-
-      // NOTE! All the defaults come from the super class
-
-      scheduledThreadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
-                                                                   "scheduled-thread-pool-max-size",
-                                                                   scheduledThreadPoolMaxSize,
-                                                                   Validators.GT_ZERO);
-
-      threadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
-                                                          "thread-pool-max-size",
-                                                          threadPoolMaxSize,
-                                                          Validators.MINUS_ONE_OR_GT_ZERO);
-
-      securityEnabled = XMLConfigurationUtil.getBoolean(e, "security-enabled", securityEnabled);
-
-      jmxManagementEnabled = XMLConfigurationUtil.getBoolean(e, "jmx-management-enabled", jmxManagementEnabled);
-
-      jmxDomain = XMLConfigurationUtil.getString(e, "jmx-domain", jmxDomain, Validators.NOT_NULL_OR_EMPTY);
-
-      securityInvalidationInterval = XMLConfigurationUtil.getLong(e,
-                                                                  "security-invalidation-interval",
-                                                                  securityInvalidationInterval,
-                                                                  Validators.GT_ZERO);
-
-      connectionTTLOverride = XMLConfigurationUtil.getLong(e,
-                                                           "connection-ttl-override",
-                                                           connectionTTLOverride,
-                                                           Validators.MINUS_ONE_OR_GT_ZERO);
-
-      asyncConnectionExecutionEnabled = XMLConfigurationUtil.getBoolean(e,
-                                                                        "async-connection-execution-enabled",
-                                                                        asyncConnectionExecutionEnabled);
-
-      transactionTimeout = XMLConfigurationUtil.getLong(e,
-                                                        "transaction-timeout",
-                                                        transactionTimeout,
-                                                        Validators.GT_ZERO);
-
-      transactionTimeoutScanPeriod = XMLConfigurationUtil.getLong(e,
-                                                                  "transaction-timeout-scan-period",
-                                                                  transactionTimeoutScanPeriod,
-                                                                  Validators.GT_ZERO);
-
-      messageExpiryScanPeriod = XMLConfigurationUtil.getLong(e,
-                                                             "message-expiry-scan-period",
-                                                             messageExpiryScanPeriod,
-                                                             Validators.GT_ZERO);
-
-      messageExpiryThreadPriority = XMLConfigurationUtil.getInteger(e,
-                                                                    "message-expiry-thread-priority",
-                                                                    messageExpiryThreadPriority,
-                                                                    Validators.THREAD_PRIORITY_RANGE);
-
-      idCacheSize = XMLConfigurationUtil.getInteger(e, "id-cache-size", idCacheSize, Validators.GT_ZERO);
-
-      persistIDCache = XMLConfigurationUtil.getBoolean(e, "persist-id-cache", persistIDCache);
-
-      managementAddress = new SimpleString(XMLConfigurationUtil.getString(e,
-                                                                          "management-address",
-                                                                          managementAddress.toString(),
-                                                                          Validators.NOT_NULL_OR_EMPTY));
-
-      managementNotificationAddress = new SimpleString(XMLConfigurationUtil.getString(e,
-                                                                                      "management-notification-address",
-                                                                                      managementNotificationAddress.toString(),
-                                                                                      Validators.NOT_NULL_OR_EMPTY));
-
-      managementClusterPassword = XMLConfigurationUtil.getString(e,
-                                                                 "management-cluster-password",
-                                                                 managementClusterPassword,
-                                                                 Validators.NOT_NULL_OR_EMPTY);
-
-      managementClusterUser = XMLConfigurationUtil.getString(e,
-                                                             "management-cluster-user",
-                                                             managementClusterUser,
-                                                             Validators.NOT_NULL_OR_EMPTY);
-
-      logDelegateFactoryClassName = XMLConfigurationUtil.getString(e,
-                                                                   "log-delegate-factory-class-name",
-                                                                   logDelegateFactoryClassName,
-                                                                   Validators.NOT_NULL_OR_EMPTY);
-
-      NodeList interceptorNodes = e.getElementsByTagName("remoting-interceptors");
-
-      ArrayList<String> interceptorList = new ArrayList<String>();
-
-      if (interceptorNodes.getLength() > 0)
-      {
-         NodeList interceptors = interceptorNodes.item(0).getChildNodes();
-
-         for (int i = 0; i < interceptors.getLength(); i++)
-         {
-            if ("class-name".equalsIgnoreCase(interceptors.item(i).getNodeName()))
-            {
-               String clazz = interceptors.item(i).getTextContent();
-
-               interceptorList.add(clazz);
-            }
-         }
-      }
-
-      interceptorClassNames = interceptorList;
-
-      NodeList backups = e.getElementsByTagName("backup-connector-ref");
-
-      // There should be only one - this will be enforced by the DTD
-
-      if (backups.getLength() > 0)
-      {
-         Node backupNode = backups.item(0);
-
-         backupConnectorName = backupNode.getAttributes().getNamedItem("connector-name").getNodeValue();
-      }
-
-      NodeList connectorNodes = e.getElementsByTagName("connector");
-
-      for (int i = 0; i < connectorNodes.getLength(); i++)
-      {
-         Element connectorNode = (Element)connectorNodes.item(i);
-
-         TransportConfiguration connectorConfig = parseTransportConfiguration(connectorNode);
-
-         if (connectorConfig.getName() == null)
-         {
-            FileConfiguration.log.warn("Cannot deploy a connector with no name specified.");
-
-            continue;
-         }
-
-         if (connectorConfigs.containsKey(connectorConfig.getName()))
-         {
-            FileConfiguration.log.warn("There is already a connector with name " + connectorConfig.getName() +
-                                       " deployed. This one will not be deployed.");
-
-            continue;
-         }
-
-         connectorConfigs.put(connectorConfig.getName(), connectorConfig);
-      }
-
-      NodeList acceptorNodes = e.getElementsByTagName("acceptor");
-
-      for (int i = 0; i < acceptorNodes.getLength(); i++)
-      {
-         Element acceptorNode = (Element)acceptorNodes.item(i);
-
-         TransportConfiguration acceptorConfig = parseTransportConfiguration(acceptorNode);
-
-         acceptorConfigs.add(acceptorConfig);
-      }
-
-      NodeList bgNodes = e.getElementsByTagName("broadcast-group");
-
-      for (int i = 0; i < bgNodes.getLength(); i++)
-      {
-         Element bgNode = (Element)bgNodes.item(i);
-
-         parseBroadcastGroupConfiguration(bgNode);
-      }
-
-      NodeList dgNodes = e.getElementsByTagName("discovery-group");
-
-      for (int i = 0; i < dgNodes.getLength(); i++)
-      {
-         Element dgNode = (Element)dgNodes.item(i);
-
-         parseDiscoveryGroupConfiguration(dgNode);
-      }
-
-      NodeList brNodes = e.getElementsByTagName("bridge");
-
-      for (int i = 0; i < brNodes.getLength(); i++)
-      {
-         Element mfNode = (Element)brNodes.item(i);
-
-         parseBridgeConfiguration(mfNode);
-      }
-
-      NodeList gaNodes = e.getElementsByTagName("grouping-handler");
-
-      for (int i = 0; i < gaNodes.getLength(); i++)
-      {
-         Element gaNode = (Element)gaNodes.item(i);
-
-         parseGroupingHandlerConfiguration(gaNode);
-      }
-
-      NodeList ccNodes = e.getElementsByTagName("cluster-connection");
-
-      for (int i = 0; i < ccNodes.getLength(); i++)
-      {
-         Element ccNode = (Element)ccNodes.item(i);
-
-         parseClusterConnectionConfiguration(ccNode);
-      }
-
-      NodeList dvNodes = e.getElementsByTagName("divert");
-
-      for (int i = 0; i < dvNodes.getLength(); i++)
-      {
-         Element dvNode = (Element)dvNodes.item(i);
-
-         parseDivertConfiguration(dvNode);
-      }
-
-      // Persistence config
-
-      largeMessagesDirectory = XMLConfigurationUtil.getString(e,
-                                                              "large-messages-directory",
-                                                              largeMessagesDirectory,
-                                                              Validators.NOT_NULL_OR_EMPTY);
-
-      bindingsDirectory = XMLConfigurationUtil.getString(e,
-                                                         "bindings-directory",
-                                                         bindingsDirectory,
-                                                         Validators.NOT_NULL_OR_EMPTY);
-
-      createBindingsDir = XMLConfigurationUtil.getBoolean(e, "create-bindings-dir", createBindingsDir);
-
-      journalDirectory = XMLConfigurationUtil.getString(e,
-                                                        "journal-directory",
-                                                        journalDirectory,
-                                                        Validators.NOT_NULL_OR_EMPTY);
-
-      pagingDirectory = XMLConfigurationUtil.getString(e,
-                                                       "paging-directory",
-                                                       pagingDirectory,
-                                                       Validators.NOT_NULL_OR_EMPTY);
-
-      createJournalDir = XMLConfigurationUtil.getBoolean(e, "create-journal-dir", createJournalDir);
-
-      String s = XMLConfigurationUtil.getString(e, "journal-type", journalType.toString(), Validators.JOURNAL_TYPE);
-
-      if (s.equals(JournalType.NIO.toString()))
-      {
-         journalType = JournalType.NIO;
-      }
-      else if (s.equals(JournalType.ASYNCIO.toString()))
-      {
-         journalType = JournalType.ASYNCIO;
-      }
-
-      journalSyncTransactional = XMLConfigurationUtil.getBoolean(e,
-                                                                 "journal-sync-transactional",
-                                                                 journalSyncTransactional);
-
-      journalSyncNonTransactional = XMLConfigurationUtil.getBoolean(e,
-                                                                    "journal-sync-non-transactional",
-                                                                    journalSyncNonTransactional);
-
-      journalFileSize = XMLConfigurationUtil.getInteger(e, "journal-file-size", journalFileSize, Validators.GT_ZERO);
-
-      int journalBufferTimeout = XMLConfigurationUtil.getInteger(e,
-                                                                 "journal-buffer-timeout",
-                                                                 journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO
-                                                                                                   : ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
-                                                                 Validators.GT_ZERO);
-
-      int journalBufferSize = XMLConfigurationUtil.getInteger(e,
-                                                              "journal-buffer-size",
-                                                              journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO
-                                                                                                : ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
-                                                              Validators.GT_ZERO);
-
-      int journalMaxIO = XMLConfigurationUtil.getInteger(e,
-                                                         "journal-max-io",
-                                                         journalType == JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO
-                                                                                           : ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO,
-                                                         Validators.GT_ZERO);
-
-      if (journalType == JournalType.ASYNCIO)
-      {
-         journalBufferTimeout_AIO = journalBufferTimeout;
-         journalBufferSize_AIO = journalBufferSize;
-         journalMaxIO_AIO = journalMaxIO;
-      }
-      else
-      {
-         journalBufferTimeout_NIO = journalBufferTimeout;
-         journalBufferSize_NIO = journalBufferSize;
-         journalMaxIO_NIO = journalMaxIO;
-      }
-
-      journalMinFiles = XMLConfigurationUtil.getInteger(e, "journal-min-files", journalMinFiles, Validators.GT_ZERO);
-
-      journalCompactMinFiles = XMLConfigurationUtil.getInteger(e,
-                                                               "journal-compact-min-files",
-                                                               journalCompactMinFiles,
-                                                               Validators.GE_ZERO);
-
-      journalCompactPercentage = XMLConfigurationUtil.getInteger(e,
-                                                                 "journal-compact-percentage",
-                                                                 journalCompactPercentage,
-                                                                 Validators.PERCENTAGE);
-
-      logJournalWriteRate = XMLConfigurationUtil.getBoolean(e,
-                                                            "log-journal-write-rate",
-                                                            ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE);
-
-      journalPerfBlastPages = XMLConfigurationUtil.getInteger(e,
-                                                              "perf-blast-pages",
-                                                              ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES,
-                                                              Validators.MINUS_ONE_OR_GT_ZERO);
-
-      runSyncSpeedTest = XMLConfigurationUtil.getBoolean(e, "run-sync-speed-test", runSyncSpeedTest);
-
-      wildcardRoutingEnabled = XMLConfigurationUtil.getBoolean(e, "wild-card-routing-enabled", wildcardRoutingEnabled);
-
-      messageCounterEnabled = XMLConfigurationUtil.getBoolean(e, "message-counter-enabled", messageCounterEnabled);
-
-      messageCounterSamplePeriod = XMLConfigurationUtil.getLong(e,
-                                                                "message-counter-sample-period",
-                                                                messageCounterSamplePeriod,
-                                                                Validators.GT_ZERO);
-
-      messageCounterMaxDayHistory = XMLConfigurationUtil.getInteger(e,
-                                                                    "message-counter-max-day-history",
-                                                                    messageCounterMaxDayHistory,
-                                                                    Validators.GT_ZERO);
-
-      serverDumpInterval = XMLConfigurationUtil.getLong(e,
-                                                        "server-dump-interval",
-                                                        serverDumpInterval,
-                                                        Validators.MINUS_ONE_OR_GT_ZERO); // in
-      // milliseconds
-
-      memoryWarningThreshold = XMLConfigurationUtil.getInteger(e,
-                                                               "memory-warning-threshold",
-                                                               memoryWarningThreshold,
-                                                               Validators.PERCENTAGE);
-
-      memoryMeasureInterval = XMLConfigurationUtil.getLong(e,
-                                                           "memory-measure-interval",
-                                                           memoryMeasureInterval,
-                                                           Validators.MINUS_ONE_OR_GT_ZERO); // in
-
-      started = true;
-   }
-
-   public synchronized void stop() throws Exception
-   {
-      started = false;
-   }
-
-   public String getConfigurationUrl()
-   {
-      return configurationUrl;
-   }
-
-   public void setConfigurationUrl(final String configurationUrl)
-   {
-      this.configurationUrl = configurationUrl;
-   }
-
-   // Private -------------------------------------------------------------------------
-
-   private TransportConfiguration parseTransportConfiguration(final Element e)
-   {
-      Node nameNode = e.getAttributes().getNamedItem("name");
-
-      String name = nameNode != null ? nameNode.getNodeValue() : null;
-
-      String clazz = XMLConfigurationUtil.getString(e, "factory-class", null, Validators.NOT_NULL_OR_EMPTY);
-
-      Map<String, Object> params = new HashMap<String, Object>();
-
-      NodeList paramsNodes = e.getElementsByTagName("param");
-
-      for (int i = 0; i < paramsNodes.getLength(); i++)
-      {
-         Node paramNode = paramsNodes.item(i);
-         NamedNodeMap attributes = paramNode.getAttributes();
-
-         Node nkey = attributes.getNamedItem("key");
-
-         String key = nkey.getTextContent();
-
-         Node nValue = attributes.getNamedItem("value");
-
-         params.put(key, nValue.getTextContent());
-      }
-
-      return new TransportConfiguration(clazz, params, name);
-   }
-
-   private void parseBroadcastGroupConfiguration(final Element e)
-   {
-      String name = e.getAttribute("name");
-
-      String localAddress = XMLConfigurationUtil.getString(e, "local-bind-address", null, Validators.NO_CHECK);
-
-      int localBindPort = XMLConfigurationUtil.getInteger(e, "local-bind-port", -1, Validators.MINUS_ONE_OR_GT_ZERO);
-
-      String groupAddress = XMLConfigurationUtil.getString(e, "group-address", null, Validators.NOT_NULL_OR_EMPTY);
-
-      int groupPort = XMLConfigurationUtil.getInteger(e, "group-port", -1, Validators.GT_ZERO);
-
-      long broadcastPeriod = XMLConfigurationUtil.getLong(e,
-                                                          "broadcast-period",
-                                                          ConfigurationImpl.DEFAULT_BROADCAST_PERIOD,
-                                                          Validators.GT_ZERO);
-
-      NodeList children = e.getChildNodes();
-
-      List<Pair<String, String>> connectorNames = new ArrayList<Pair<String, String>>();
-
-      for (int j = 0; j < children.getLength(); j++)
-      {
-         Node child = children.item(j);
-
-         if (child.getNodeName().equals("connector-ref"))
-         {
-            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
-
-            Node backupConnectorNode = child.getAttributes().getNamedItem("backup-connector-name");
-
-            String backupConnectorName = null;
-
-            if (backupConnectorNode != null)
-            {
-               backupConnectorName = backupConnectorNode.getNodeValue();
-            }
-
-            Pair<String, String> connectorInfo = new Pair<String, String>(connectorName, backupConnectorName);
-
-            connectorNames.add(connectorInfo);
-         }
-      }
-
-      BroadcastGroupConfiguration config = new BroadcastGroupConfiguration(name,
-                                                                           localAddress,
-                                                                           localBindPort,
-                                                                           groupAddress,
-                                                                           groupPort,
-                                                                           broadcastPeriod,
-                                                                           connectorNames);
-
-      broadcastGroupConfigurations.add(config);
-   }
-
-   private void parseDiscoveryGroupConfiguration(final Element e)
-   {
-      String name = e.getAttribute("name");
-
-      String groupAddress = XMLConfigurationUtil.getString(e, "group-address", null, Validators.NOT_NULL_OR_EMPTY);
-
-      int groupPort = XMLConfigurationUtil.getInteger(e, "group-port", -1, Validators.MINUS_ONE_OR_GT_ZERO);
-
-      long refreshTimeout = XMLConfigurationUtil.getLong(e,
-                                                         "refresh-timeout",
-                                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
-                                                         Validators.GT_ZERO);
-
-      DiscoveryGroupConfiguration config = new DiscoveryGroupConfiguration(name,
-                                                                           groupAddress,
-                                                                           groupPort,
-                                                                           refreshTimeout);
-
-      if (discoveryGroupConfigurations.containsKey(name))
-      {
-         FileConfiguration.log.warn("There is already a discovery group with name " + name +
-                                    " deployed. This one will not be deployed.");
-
-         return;
-      }
-      else
-      {
-         discoveryGroupConfigurations.put(name, config);
-      }
-   }
-
-   private void parseClusterConnectionConfiguration(final Element e)
-   {
-      String name = e.getAttribute("name");
-
-      String address = XMLConfigurationUtil.getString(e, "address", null, Validators.NOT_NULL_OR_EMPTY);
-
-      boolean duplicateDetection = XMLConfigurationUtil.getBoolean(e,
-                                                                   "use-duplicate-detection",
-                                                                   ConfigurationImpl.DEFAULT_CLUSTER_DUPLICATE_DETECTION);
-
-      boolean forwardWhenNoConsumers = XMLConfigurationUtil.getBoolean(e,
-                                                                       "forward-when-no-consumers",
-                                                                       ConfigurationImpl.DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS);
-
-      int maxHops = XMLConfigurationUtil.getInteger(e,
-                                                    "max-hops",
-                                                    ConfigurationImpl.DEFAULT_CLUSTER_MAX_HOPS,
-                                                    Validators.GE_ZERO);
-
-      long retryInterval = XMLConfigurationUtil.getLong(e,
-                                                        "retry-interval",
-                                                        ConfigurationImpl.DEFAULT_CLUSTER_RETRY_INTERVAL,
-                                                        Validators.GT_ZERO);
-
-      int confirmationWindowSize = XMLConfigurationUtil.getInteger(e,
-                                                                   "confirmation-window-size",
-                                                                   FileConfiguration.DEFAULT_CONFIRMATION_WINDOW_SIZE,
-                                                                   Validators.GT_ZERO);
-
-      String discoveryGroupName = null;
-
-      List<Pair<String, String>> connectorPairs = new ArrayList<Pair<String, String>>();
-
-      NodeList children = e.getChildNodes();
-
-      for (int j = 0; j < children.getLength(); j++)
-      {
-         Node child = children.item(j);
-
-         if (child.getNodeName().equals("discovery-group-ref"))
-         {
-            discoveryGroupName = child.getAttributes().getNamedItem("discovery-group-name").getNodeValue();
-         }
-         else if (child.getNodeName().equals("connector-ref"))
-         {
-            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
-
-            Node backupNode = child.getAttributes().getNamedItem("backup-connector-name");
-
-            String backupConnectorName = null;
-
-            if (backupNode != null)
-            {
-               backupConnectorName = backupNode.getNodeValue();
-            }
-
-            Pair<String, String> connectorPair = new Pair<String, String>(connectorName, backupConnectorName);
-
-            connectorPairs.add(connectorPair);
-         }
-      }
-
-      ClusterConnectionConfiguration config;
-
-      if (discoveryGroupName == null)
-      {
-         config = new ClusterConnectionConfiguration(name,
-                                                     address,
-                                                     retryInterval,
-                                                     duplicateDetection,
-                                                     forwardWhenNoConsumers,
-                                                     maxHops,
-                                                     confirmationWindowSize,
-                                                     connectorPairs);
-      }
-      else
-      {
-         config = new ClusterConnectionConfiguration(name,
-                                                     address,
-                                                     retryInterval,
-                                                     duplicateDetection,
-                                                     forwardWhenNoConsumers,
-                                                     maxHops,
-                                                     confirmationWindowSize,
-                                                     discoveryGroupName);
-      }
-
-      clusterConfigurations.add(config);
-   }
-
-   private void parseGroupingHandlerConfiguration(final Element node)
-   {
-      String name = node.getAttribute("name");
-      String type = XMLConfigurationUtil.getString(node, "type", null, Validators.NOT_NULL_OR_EMPTY);
-      String address = XMLConfigurationUtil.getString(node, "address", null, Validators.NOT_NULL_OR_EMPTY);
-      Integer timeout = XMLConfigurationUtil.getInteger(node,
-                                                        "timeout",
-                                                        GroupingHandlerConfiguration.DEFAULT_TIMEOUT,
-                                                        Validators.GT_ZERO);
-      groupingHandlerConfiguration = new GroupingHandlerConfiguration(new SimpleString(name),
-                                                                      type.equals(GroupingHandlerConfiguration.TYPE.LOCAL.getType()) ? GroupingHandlerConfiguration.TYPE.LOCAL
-                                                                                                                                    : GroupingHandlerConfiguration.TYPE.REMOTE,
-                                                                      new SimpleString(address),
-                                                                      timeout);
-   }
-
-   private void parseBridgeConfiguration(final Element brNode)
-   {
-      String name = brNode.getAttribute("name");
-
-      String queueName = XMLConfigurationUtil.getString(brNode, "queue-name", null, Validators.NOT_NULL_OR_EMPTY);
-
-      String forwardingAddress = XMLConfigurationUtil.getString(brNode,
-                                                                "forwarding-address",
-                                                                null,
-                                                                Validators.NOT_NULL_OR_EMPTY);
-
-      String transformerClassName = XMLConfigurationUtil.getString(brNode,
-                                                                   "transformer-class-name",
-                                                                   null,
-                                                                   Validators.NO_CHECK);
-
-      long retryInterval = XMLConfigurationUtil.getLong(brNode,
-                                                        "retry-interval",
-                                                        ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
-                                                        Validators.GT_ZERO);
-
-      // Default bridge conf
-      int confirmationWindowSize = XMLConfigurationUtil.getInteger(brNode,
-                                                                   "confirmation-window-size",
-                                                                   FileConfiguration.DEFAULT_CONFIRMATION_WINDOW_SIZE,
-                                                                   Validators.GT_ZERO);
-
-      double retryIntervalMultiplier = XMLConfigurationUtil.getDouble(brNode,
-                                                                      "retry-interval-multiplier",
-                                                                      ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
-                                                                      Validators.GT_ZERO);
-
-      int reconnectAttempts = XMLConfigurationUtil.getInteger(brNode,
-                                                              "reconnect-attempts",
-                                                              ConfigurationImpl.DEFAULT_BRIDGE_RECONNECT_ATTEMPTS,
-                                                              Validators.MINUS_ONE_OR_GE_ZERO);
-
-      boolean failoverOnServerShutdown = XMLConfigurationUtil.getBoolean(brNode,
-                                                                         "failover-on-server-shutdown",
-                                                                         ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
-
-      boolean useDuplicateDetection = XMLConfigurationUtil.getBoolean(brNode,
-                                                                      "use-duplicate-detection",
-                                                                      ConfigurationImpl.DEFAULT_BRIDGE_DUPLICATE_DETECTION);
-
-      String filterString = null;
-
-      Pair<String, String> connectorPair = null;
-
-      String discoveryGroupName = null;
-
-      NodeList children = brNode.getChildNodes();
-
-      for (int j = 0; j < children.getLength(); j++)
-      {
-         Node child = children.item(j);
-
-         if (child.getNodeName().equals("filter"))
-         {
-            filterString = child.getAttributes().getNamedItem("string").getNodeValue();
-         }
-         else if (child.getNodeName().equals("discovery-group-ref"))
-         {
-            discoveryGroupName = child.getAttributes().getNamedItem("discovery-group-name").getNodeValue();
-         }
-         else if (child.getNodeName().equals("connector-ref"))
-         {
-            String connectorName = child.getAttributes().getNamedItem("connector-name").getNodeValue();
-
-            Node backupNode = child.getAttributes().getNamedItem("backup-connector-name");
-
-            String backupConnectorName = null;
-
-            if (backupNode != null)
-            {
-               backupConnectorName = backupNode.getNodeValue();
-            }
-
-            connectorPair = new Pair<String, String>(connectorName, backupConnectorName);
-         }
-      }
-
-      BridgeConfiguration config;
-
-      if (connectorPair != null)
-      {
-         config = new BridgeConfiguration(name,
-                                          queueName,
-                                          forwardingAddress,
-                                          filterString,
-                                          transformerClassName,
-                                          retryInterval,
-                                          retryIntervalMultiplier,
-                                          reconnectAttempts,
-                                          failoverOnServerShutdown,
-                                          useDuplicateDetection,
-                                          confirmationWindowSize,
-                                          ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
-                                          connectorPair);
-      }
-      else
-      {
-         config = new BridgeConfiguration(name,
-                                          queueName,
-                                          forwardingAddress,
-                                          filterString,
-                                          transformerClassName,
-                                          retryInterval,
-                                          retryIntervalMultiplier,
-                                          reconnectAttempts,
-                                          failoverOnServerShutdown,
-                                          useDuplicateDetection,
-                                          confirmationWindowSize,
-                                          ClientSessionFactoryImpl.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
-                                          discoveryGroupName);
-      }
-
-      bridgeConfigurations.add(config);
-   }
-
-   private void parseDivertConfiguration(final Element e)
-   {
-      String name = e.getAttribute("name");
-
-      String routingName = XMLConfigurationUtil.getString(e, "routing-name", null, Validators.NO_CHECK);
-
-      String address = XMLConfigurationUtil.getString(e, "address", null, Validators.NOT_NULL_OR_EMPTY);
-
-      String forwardingAddress = XMLConfigurationUtil.getString(e,
-                                                                "forwarding-address",
-                                                                null,
-                                                                Validators.NOT_NULL_OR_EMPTY);
-
-      boolean exclusive = XMLConfigurationUtil.getBoolean(e, "exclusive", ConfigurationImpl.DEFAULT_DIVERT_EXCLUSIVE);
-
-      String transformerClassName = XMLConfigurationUtil.getString(e,
-                                                                   "transformer-class-name",
-                                                                   null,
-                                                                   Validators.NO_CHECK);
-
-      String filterString = null;
-
-      NodeList children = e.getChildNodes();
-
-      for (int j = 0; j < children.getLength(); j++)
-      {
-         Node child = children.item(j);
-
-         if (child.getNodeName().equals("filter"))
-         {
-            filterString = child.getAttributes().getNamedItem("string").getNodeValue();
-         }
-      }
-
-      DivertConfiguration config = new DivertConfiguration(name,
-                                                           routingName,
-                                                           address,
-                                                           forwardingAddress,
-                                                           exclusive,
-                                                           filterString,
-                                                           transformerClassName);
-
-      divertConfigurations.add(config);
-   }
-}

Modified: trunk/src/main/org/hornetq/core/journal/impl/AIOSequentialFileFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/AIOSequentialFileFactory.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/journal/impl/AIOSequentialFileFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,7 +21,7 @@
 
 import org.hornetq.core.asyncio.BufferCallback;
 import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.SequentialFile;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.utils.HornetQThreadFactory;

Modified: trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFileFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFileFactory.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFileFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import java.nio.ByteBuffer;
 
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.SequentialFile;
 import org.hornetq.core.journal.SequentialFileFactory;
 import org.hornetq.core.logging.Logger;

Modified: trunk/src/main/org/hornetq/core/management/ObjectNameBuilder.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/ObjectNameBuilder.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/management/ObjectNameBuilder.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,7 +16,7 @@
 import javax.management.ObjectName;
 
 import org.hornetq.SimpleString;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.jms.management.ConnectionFactoryControl;
 import org.hornetq.jms.management.JMSQueueControl;
 import org.hornetq.jms.management.JMSServerControl;

Modified: trunk/src/main/org/hornetq/core/messagecounter/impl/MessageCounterManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/messagecounter/impl/MessageCounterManagerImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/messagecounter/impl/MessageCounterManagerImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,7 +21,7 @@
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.messagecounter.MessageCounter;
 import org.hornetq.core.messagecounter.MessageCounterManager;

Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,7 +23,7 @@
 import java.util.concurrent.ScheduledExecutorService;
 
 import org.hornetq.core.buffers.HornetQBuffer;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

Modified: trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,9 +26,9 @@
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.SendAcknowledgementHandler;
 import org.hornetq.core.client.SessionFailureListener;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.client.management.impl.ManagementHelper;
 import org.hornetq.core.config.TransportConfiguration;

Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -35,14 +35,14 @@
 import org.hornetq.Pair;
 import org.hornetq.SimpleString;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.FailoverManager;
 import org.hornetq.core.client.impl.FailoverManagerImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.deployers.Deployer;
 import org.hornetq.core.deployers.DeploymentManager;
 import org.hornetq.core.deployers.impl.AddressSettingsDeployer;

Modified: trunk/src/main/org/hornetq/core/server/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/management/impl/ManagementServiceImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/core/server/management/impl/ManagementServiceImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -32,13 +32,13 @@
 import org.hornetq.core.client.management.impl.ManagementHelper;
 import org.hornetq.core.cluster.DiscoveryGroup;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
 import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.AcceptorControl;
 import org.hornetq.core.management.BridgeControl;

Copied: trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java (from rev 8697, trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/HornetQConnectionFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,632 @@
+/*
+ * 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.Pair;
+import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.TransportConfiguration;
+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 = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
+
+   private int transactionBatchSize = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
+
+   private boolean readOnly;
+
+   // Constructors ---------------------------------------------------------------------------------
+
+   public HornetQConnectionFactory()
+   {
+      sessionFactory = new ClientSessionFactoryImpl();
+   }
+
+   public HornetQConnectionFactory(final ClientSessionFactory sessionFactory)
+   {
+      this.sessionFactory = sessionFactory;
+   }
+
+   public HornetQConnectionFactory(final String discoveryAddress, final int discoveryPort)
+   {
+      sessionFactory = new ClientSessionFactoryImpl(discoveryAddress, discoveryPort);
+   }
+
+   public HornetQConnectionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
+   {
+      sessionFactory = new ClientSessionFactoryImpl(staticConnectors);
+   }
+
+   public HornetQConnectionFactory(final TransportConfiguration connectorConfig,
+                                   final TransportConfiguration backupConnectorConfig)
+   {
+      sessionFactory = new ClientSessionFactoryImpl(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 --------------------------------------------------------------------------------
+
+}

Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnection.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnection.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnection.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -120,7 +120,7 @@
 
    // Constructors ---------------------------------------------------------------------------------
 
-   protected HornetQConnection(final String username,
+   public HornetQConnection(final String username,
                             final String password,
                             final int connectionType,
                             final String clientID,

Deleted: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,631 +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.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.Pair;
-import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
-import org.hornetq.core.config.TransportConfiguration;
-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 = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
-
-   private int transactionBatchSize = ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
-
-   private boolean readOnly;
-
-   // Constructors ---------------------------------------------------------------------------------
-
-   public HornetQConnectionFactory()
-   {
-      sessionFactory = new ClientSessionFactoryImpl();
-   }
-
-   public HornetQConnectionFactory(final ClientSessionFactory sessionFactory)
-   {
-      this.sessionFactory = sessionFactory;
-   }
-
-   public HornetQConnectionFactory(final String discoveryAddress, final int discoveryPort)
-   {
-      sessionFactory = new ClientSessionFactoryImpl(discoveryAddress, discoveryPort);
-   }
-
-   public HornetQConnectionFactory(final List<Pair<TransportConfiguration, TransportConfiguration>> staticConnectors)
-   {
-      sessionFactory = new ClientSessionFactoryImpl(staticConnectors);
-   }
-
-   public HornetQConnectionFactory(final TransportConfiguration connectorConfig,
-                                   final TransportConfiguration backupConnectorConfig)
-   {
-      sessionFactory = new ClientSessionFactoryImpl(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 --------------------------------------------------------------------------------
-
-}

Modified: trunk/src/main/org/hornetq/jms/client/package-info.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/package-info.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/client/package-info.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -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.client.HornetQConnectionFactory} which can be instantiated directly
+ * except {@link org.hornetq.jms.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-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import javax.management.StandardMBean;
 
 import org.hornetq.core.management.impl.MBeanInfoHelper;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.management.ConnectionFactoryControl;
 import org.hornetq.jms.management.JMSQueueControl;
 

Copied: trunk/src/main/org/hornetq/jms/server/JMSServerManagerImpl.java (from rev 8697, trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java)
===================================================================
--- trunk/src/main/org/hornetq/jms/server/JMSServerManagerImpl.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/server/JMSServerManagerImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -0,0 +1,862 @@
+/*
+ * 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.server;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+import org.hornetq.Pair;
+import org.hornetq.core.config.TransportConfiguration;
+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.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQQueue;
+import org.hornetq.jms.HornetQTopic;
+import org.hornetq.jms.client.SelectorTranslator;
+import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
+import org.hornetq.jms.server.config.JMSConfiguration;
+import org.hornetq.jms.server.config.QueueConfiguration;
+import org.hornetq.jms.server.config.TopicConfiguration;
+import org.hornetq.jms.server.impl.JMSServerDeployer;
+import org.hornetq.jms.server.management.JMSManagementService;
+import org.hornetq.jms.server.management.impl.JMSManagementServiceImpl;
+
+/**
+ * A Deployer used to create and add to JNDI queues, topics and connection
+ * factories. Typically this would only be used in an app server env.
+ * 
+ * JMS Connection Factories & Destinations can be configured either
+ * using configuration files or using a JMSConfiguration object.
+ * 
+ * If configuration files are used, JMS resources are redeployed if the
+ * files content is changed.
+ * If a JMSConfiguration object is used, the JMS resources can not be
+ * redeployed.
+ *
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ * @author <a href="jmesnil at redhat.com">Jeff Mesnil</a>
+ * @author <a href="tim.fox at jboss.com">Tim Fox</a>
+ */
+public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
+{
+   private static final Logger log = Logger.getLogger(JMSServerManagerImpl.class);
+
+   private static final String REJECT_FILTER = "__HQX=-1";
+
+   /**
+    * the context to bind to
+    */
+   private Context context;
+
+   private final Map<String, List<String>> destinations = new HashMap<String, List<String>>();
+
+   private final Map<String, HornetQConnectionFactory> connectionFactories = new HashMap<String, HornetQConnectionFactory>();
+
+   private final Map<String, List<String>> connectionFactoryBindings = new HashMap<String, List<String>>();
+
+   private final HornetQServer server;
+
+   private JMSManagementService jmsManagementService;
+
+   private XmlDeployer jmsDeployer;
+
+   private boolean started;
+
+   private boolean active;
+
+   private DeploymentManager deploymentManager;
+
+   private final String configFileName;
+
+   private boolean contextSet;
+
+   private JMSConfiguration config;
+
+   public JMSServerManagerImpl(final HornetQServer server) throws Exception
+   {
+      this.server = server;
+
+      configFileName = null;
+   }
+
+   public JMSServerManagerImpl(final HornetQServer server, final String configFileName) throws Exception
+   {
+      this.server = server;
+
+      this.configFileName = configFileName;
+   }
+
+   public JMSServerManagerImpl(final HornetQServer server, final JMSConfiguration configuration) throws Exception
+   {
+      this.server = server;
+
+      configFileName = null;
+
+      config = configuration;
+   }
+
+   // ActivateCallback implementation -------------------------------------
+
+   public synchronized void activated()
+   {
+      active = true;
+
+      jmsManagementService = new JMSManagementServiceImpl(server.getManagementService());
+
+      try
+      {
+         jmsManagementService.registerJMSServer(this);
+
+         // start the JMS deployer only if the configuration is not done using the JMSConfiguration object
+         if (config == null)
+         {
+            jmsDeployer = new JMSServerDeployer(this, deploymentManager, server.getConfiguration());
+
+            if (configFileName != null)
+            {
+               jmsDeployer.setConfigFileNames(new String[] { configFileName });
+            }
+
+            jmsDeployer.start();
+
+            deploymentManager.start();
+         }
+         else
+         {
+            deploy();
+         }
+      }
+      catch (Exception e)
+      {
+         JMSServerManagerImpl.log.error("Failed to start jms deployer", e);
+      }
+   }
+
+   // HornetQComponent implementation -----------------------------------
+
+   public synchronized void start() throws Exception
+   {
+      if (started)
+      {
+         return;
+      }
+
+      if (!contextSet)
+      {
+         context = new InitialContext();
+      }
+
+      deploymentManager = new FileDeploymentManager(server.getConfiguration().getFileDeployerScanPeriod());
+
+      server.registerActivateCallback(this);
+
+      server.start();
+
+      started = true;
+   }
+
+   public synchronized void stop() throws Exception
+   {
+      if (!started)
+      {
+         return;
+      }
+
+      if (jmsDeployer != null)
+      {
+         jmsDeployer.stop();
+      }
+
+      if (deploymentManager != null)
+      {
+         deploymentManager.stop();
+      }
+
+      for (String destination : destinations.keySet())
+      {
+         undeployDestination(destination);
+      }
+
+      for (String connectionFactory : new HashSet<String>(connectionFactories.keySet()))
+      {
+         destroyConnectionFactory(connectionFactory);
+      }
+
+      destinations.clear();
+      connectionFactories.clear();
+      connectionFactoryBindings.clear();
+
+      if (context != null)
+      {
+         context.close();
+      }
+
+      jmsManagementService.unregisterJMSServer();
+
+      jmsManagementService.stop();
+
+      server.stop();
+
+      started = false;
+   }
+
+   public boolean isStarted()
+   {
+      return server.getHornetQServerControl().isStarted();
+   }
+
+   // JMSServerManager implementation -------------------------------
+
+   public HornetQServer getHornetQServer()
+   {
+      return server;
+   }
+
+   public synchronized void setContext(final Context context)
+   {
+      this.context = context;
+
+      contextSet = true;
+   }
+
+   public synchronized String getVersion()
+   {
+      checkInitialised();
+
+      return server.getHornetQServerControl().getVersion();
+   }
+
+   public synchronized boolean createQueue(final String queueName,
+                                           final String jndiBinding,
+                                           final String selectorString,
+                                           final boolean durable) throws Exception
+   {
+      checkInitialised();
+      HornetQQueue jBossQueue = new HornetQQueue(queueName);
+
+      // Convert from JMS selector to core filter
+      String coreFilterString = null;
+
+      if (selectorString != null)
+      {
+         coreFilterString = SelectorTranslator.convertToHornetQFilterString(selectorString);
+      }
+
+      server.getHornetQServerControl().deployQueue(jBossQueue.getAddress(),
+                                                   jBossQueue.getAddress(),
+                                                   coreFilterString,
+                                                   durable);
+
+      boolean added = bindToJndi(jndiBinding, jBossQueue);
+
+      if (added)
+      {
+         addToDestinationBindings(queueName, jndiBinding);
+      }
+
+      jmsManagementService.registerQueue(jBossQueue, jndiBinding);
+      return added;
+   }
+
+   public synchronized boolean createTopic(final String topicName, final String jndiBinding) throws Exception
+   {
+      checkInitialised();
+      HornetQTopic jBossTopic = new HornetQTopic(topicName);
+      // We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS
+      // checks when routing messages to a topic that
+      // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no
+      // subscriptions - core has no notion of a topic
+      server.getHornetQServerControl().deployQueue(jBossTopic.getAddress(),
+                                                   jBossTopic.getAddress(),
+                                                   JMSServerManagerImpl.REJECT_FILTER,
+                                                   true);
+      boolean added = bindToJndi(jndiBinding, jBossTopic);
+      if (added)
+      {
+         addToDestinationBindings(topicName, jndiBinding);
+      }
+      jmsManagementService.registerTopic(jBossTopic, jndiBinding);
+      return added;
+   }
+
+   public synchronized boolean undeployDestination(final String name) throws Exception
+   {
+      checkInitialised();
+      List<String> jndiBindings = destinations.get(name);
+      if (jndiBindings == null || jndiBindings.size() == 0)
+      {
+         return false;
+      }
+      if (context != null)
+      {
+         Iterator<String> iter = jndiBindings.iterator();
+         while (iter.hasNext())
+         {
+            String jndiBinding = iter.next();
+            context.unbind(jndiBinding);
+            iter.remove();
+         }
+      }
+      return true;
+   }
+
+   public synchronized boolean destroyQueue(final String name) throws Exception
+   {
+      checkInitialised();
+      undeployDestination(name);
+
+      destinations.remove(name);
+      jmsManagementService.unregisterQueue(name);
+      server.getHornetQServerControl().destroyQueue(HornetQQueue.createAddressFromName(name).toString());
+
+      return true;
+   }
+
+   public synchronized boolean destroyTopic(final String name) throws Exception
+   {
+      checkInitialised();
+      undeployDestination(name);
+
+      destinations.remove(name);
+      jmsManagementService.unregisterTopic(name);
+      server.getHornetQServerControl().destroyQueue(HornetQTopic.createAddressFromName(name).toString());
+
+      return true;
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(connectorConfigs);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
+                                                    final String clientID,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(connectorConfigs);
+         cf.setClientID(clientID);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
+                                                    final String clientID,
+                                                    final long clientFailureCheckPeriod,
+                                                    final long connectionTTL,
+                                                    final long callTimeout,
+                                                    final boolean cacheLargeMessagesClient,
+                                                    final int minLargeMessageSize,
+                                                    final int consumerWindowSize,
+                                                    final int consumerMaxRate,
+                                                    final int confirmationWindowSize,
+                                                    final int producerWindowSize,
+                                                    final int producerMaxRate,
+                                                    final boolean blockOnAcknowledge,
+                                                    final boolean blockOnDurableSend,
+                                                    final boolean blockOnNonDurableSend,
+                                                    final boolean autoGroup,
+                                                    final boolean preAcknowledge,
+                                                    final String loadBalancingPolicyClassName,
+                                                    final int transactionBatchSize,
+                                                    final int dupsOKBatchSize,
+                                                    final boolean useGlobalPools,
+                                                    final int scheduledThreadPoolMaxSize,
+                                                    final int threadPoolMaxSize,
+                                                    final long retryInterval,
+                                                    final double retryIntervalMultiplier,
+                                                    final long maxRetryInterval,
+                                                    final int reconnectAttempts,
+                                                    final boolean failoverOnServerShutdown,
+                                                    final String groupId,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(connectorConfigs);
+         cf.setClientID(clientID);
+         cf.setClientFailureCheckPeriod(clientFailureCheckPeriod);
+         cf.setConnectionTTL(connectionTTL);
+         cf.setCallTimeout(callTimeout);
+         cf.setCacheLargeMessagesClient(cacheLargeMessagesClient);
+         cf.setMinLargeMessageSize(minLargeMessageSize);
+         cf.setConsumerWindowSize(consumerWindowSize);
+         cf.setConsumerMaxRate(consumerMaxRate);
+         cf.setConfirmationWindowSize(confirmationWindowSize);
+         cf.setProducerWindowSize(producerWindowSize);
+         cf.setProducerMaxRate(producerMaxRate);
+         cf.setBlockOnAcknowledge(blockOnAcknowledge);
+         cf.setBlockOnDurableSend(blockOnDurableSend);
+         cf.setBlockOnNonDurableSend(blockOnNonDurableSend);
+         cf.setAutoGroup(autoGroup);
+         cf.setPreAcknowledge(preAcknowledge);
+         cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+         cf.setTransactionBatchSize(transactionBatchSize);
+         cf.setDupsOKBatchSize(dupsOKBatchSize);
+         cf.setUseGlobalPools(useGlobalPools);
+         cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
+         cf.setThreadPoolMaxSize(threadPoolMaxSize);
+         cf.setRetryInterval(retryInterval);
+         cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
+         cf.setMaxRetryInterval(maxRetryInterval);
+         cf.setReconnectAttempts(reconnectAttempts);
+         cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
+         cf.setGroupID(groupId);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final String discoveryAddress,
+                                                    final int discoveryPort,
+                                                    final String clientID,
+                                                    final long discoveryRefreshTimeout,
+                                                    final long clientFailureCheckPeriod,
+                                                    final long connectionTTL,
+                                                    final long callTimeout,
+                                                    final boolean cacheLargeMessagesClient,
+                                                    final int minLargeMessageSize,
+                                                    final int consumerWindowSize,
+                                                    final int consumerMaxRate,
+                                                    final int confirmationWindowSize,
+                                                    final int producerWindowSize,
+                                                    final int producerMaxRate,
+                                                    final boolean blockOnAcknowledge,
+                                                    final boolean blockOnDurableSend,
+                                                    final boolean blockOnNonDurableSend,
+                                                    final boolean autoGroup,
+                                                    final boolean preAcknowledge,
+                                                    final String loadBalancingPolicyClassName,
+                                                    final int transactionBatchSize,
+                                                    final int dupsOKBatchSize,
+                                                    final long initialWaitTimeout,
+                                                    final boolean useGlobalPools,
+                                                    final int scheduledThreadPoolMaxSize,
+                                                    final int threadPoolMaxSize,
+                                                    final long retryInterval,
+                                                    final double retryIntervalMultiplier,
+                                                    final long maxRetryInterval,
+                                                    final int reconnectAttempts,
+                                                    final boolean failoverOnServerShutdown,
+                                                    final String groupId,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
+         cf.setClientID(clientID);
+         cf.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+         cf.setClientFailureCheckPeriod(clientFailureCheckPeriod);
+         cf.setConnectionTTL(connectionTTL);
+         cf.setCallTimeout(callTimeout);
+         cf.setCacheLargeMessagesClient(cacheLargeMessagesClient);
+         cf.setMinLargeMessageSize(minLargeMessageSize);
+         cf.setConsumerWindowSize(consumerWindowSize);
+         cf.setConsumerMaxRate(consumerMaxRate);
+         cf.setConfirmationWindowSize(confirmationWindowSize);
+         cf.setProducerWindowSize(producerWindowSize);
+         cf.setProducerMaxRate(producerMaxRate);
+         cf.setBlockOnAcknowledge(blockOnAcknowledge);
+         cf.setBlockOnDurableSend(blockOnDurableSend);
+         cf.setBlockOnNonDurableSend(blockOnNonDurableSend);
+         cf.setAutoGroup(autoGroup);
+         cf.setPreAcknowledge(preAcknowledge);
+         cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+         cf.setTransactionBatchSize(transactionBatchSize);
+         cf.setDupsOKBatchSize(dupsOKBatchSize);
+         cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
+         cf.setUseGlobalPools(useGlobalPools);
+         cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
+         cf.setThreadPoolMaxSize(threadPoolMaxSize);
+         cf.setRetryInterval(retryInterval);
+         cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
+         cf.setMaxRetryInterval(maxRetryInterval);
+         cf.setReconnectAttempts(reconnectAttempts);
+         cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final String discoveryAddress,
+                                                    final int discoveryPort,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final String discoveryAddress,
+                                                    final int discoveryPort,
+                                                    final String clientID,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
+         cf.setClientID(clientID);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final TransportConfiguration liveTC,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(liveTC);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final TransportConfiguration liveTC,
+                                                    final String clientID,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(liveTC);
+         cf.setClientID(clientID);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final TransportConfiguration liveTC,
+                                                    final TransportConfiguration backupTC,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(liveTC, backupTC);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized void createConnectionFactory(final String name,
+                                                    final TransportConfiguration liveTC,
+                                                    final TransportConfiguration backupTC,
+                                                    final String clientID,
+                                                    final List<String> jndiBindings) throws Exception
+   {
+      checkInitialised();
+      HornetQConnectionFactory cf = connectionFactories.get(name);
+      if (cf == null)
+      {
+         cf = new HornetQConnectionFactory(liveTC, backupTC);
+         cf.setClientID(clientID);
+      }
+
+      bindConnectionFactory(cf, name, jndiBindings);
+   }
+
+   public synchronized boolean destroyConnectionFactory(final String name) throws Exception
+   {
+      checkInitialised();
+      List<String> jndiBindings = connectionFactoryBindings.get(name);
+      if (jndiBindings == null || jndiBindings.size() == 0)
+      {
+         return false;
+      }
+      if (context != null)
+      {
+         for (String jndiBinding : jndiBindings)
+         {
+            try
+            {
+               context.unbind(jndiBinding);
+            }
+            catch (NameNotFoundException e)
+            {
+               // this is ok.
+            }
+         }
+      }
+      connectionFactoryBindings.remove(name);
+      connectionFactories.remove(name);
+
+      jmsManagementService.unregisterConnectionFactory(name);
+
+      return true;
+   }
+
+   public String[] listRemoteAddresses() throws Exception
+   {
+      checkInitialised();
+      return server.getHornetQServerControl().listRemoteAddresses();
+   }
+
+   public String[] listRemoteAddresses(final String ipAddress) throws Exception
+   {
+      checkInitialised();
+      return server.getHornetQServerControl().listRemoteAddresses(ipAddress);
+   }
+
+   public boolean closeConnectionsForAddress(final String ipAddress) throws Exception
+   {
+      checkInitialised();
+      return server.getHornetQServerControl().closeConnectionsForAddress(ipAddress);
+   }
+
+   public String[] listConnectionIDs() throws Exception
+   {
+      return server.getHornetQServerControl().listConnectionIDs();
+   }
+
+   public String[] listSessions(final String connectionID) throws Exception
+   {
+      checkInitialised();
+      return server.getHornetQServerControl().listSessions(connectionID);
+   }
+
+   // Public --------------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   private synchronized void checkInitialised()
+   {
+      if (!active)
+      {
+         throw new IllegalStateException("Cannot access JMS Server, core server is not yet active");
+      }
+   }
+
+   private void bindConnectionFactory(final HornetQConnectionFactory cf,
+                                      final String name,
+                                      final List<String> jndiBindings) throws Exception
+   {
+      for (String jndiBinding : jndiBindings)
+      {
+         bindToJndi(jndiBinding, cf);
+
+         if (connectionFactoryBindings.get(name) == null)
+         {
+            connectionFactoryBindings.put(name, new ArrayList<String>());
+         }
+         connectionFactoryBindings.get(name).add(jndiBinding);
+      }
+
+      jmsManagementService.registerConnectionFactory(name, cf, jndiBindings);
+   }
+
+   private boolean bindToJndi(final String jndiName, final Object objectToBind) throws NamingException
+   {
+      if (context != null)
+      {
+         String parentContext;
+         String jndiNameInContext;
+         int sepIndex = jndiName.lastIndexOf('/');
+         if (sepIndex == -1)
+         {
+            parentContext = "";
+         }
+         else
+         {
+            parentContext = jndiName.substring(0, sepIndex);
+         }
+         jndiNameInContext = jndiName.substring(sepIndex + 1);
+         try
+         {
+            context.lookup(jndiName);
+
+            JMSServerManagerImpl.log.warn("Binding for " + jndiName + " already exists");
+            return false;
+         }
+         catch (Throwable e)
+         {
+            // OK
+         }
+
+         Context c = org.hornetq.utils.JNDIUtil.createContext(context, parentContext);
+
+         c.rebind(jndiNameInContext, objectToBind);
+      }
+      return true;
+   }
+
+   private void addToDestinationBindings(final String destination, final String jndiBinding)
+   {
+      if (destinations.get(destination) == null)
+      {
+         destinations.put(destination, new ArrayList<String>());
+      }
+      destinations.get(destination).add(jndiBinding);
+   }
+
+   private void deploy() throws Exception
+   {
+      if (config == null)
+      {
+         return;
+      }
+
+      if (config.getContext() != null)
+      {
+         setContext(config.getContext());
+      }
+
+      List<ConnectionFactoryConfiguration> connectionFactoryConfigurations = config.getConnectionFactoryConfigurations();
+      for (ConnectionFactoryConfiguration config : connectionFactoryConfigurations)
+      {
+         if (config.getDiscoveryAddress() != null)
+         {
+            createConnectionFactory(config.getName(),
+                                    config.getDiscoveryAddress(),
+                                    config.getDiscoveryPort(),
+                                    config.getClientID(),
+                                    config.getDiscoveryRefreshTimeout(),
+                                    config.getClientFailureCheckPeriod(),
+                                    config.getConnectionTTL(),
+                                    config.getCallTimeout(),
+                                    config.isCacheLargeMessagesClient(),
+                                    config.getMinLargeMessageSize(),
+                                    config.getConsumerWindowSize(),
+                                    config.getConsumerMaxRate(),
+                                    config.getConfirmationWindowSize(),
+                                    config.getProducerWindowSize(),
+                                    config.getProducerMaxRate(),
+                                    config.isBlockOnAcknowledge(),
+                                    config.isBlockOnDurableSend(),
+                                    config.isBlockOnNonDurableSend(),
+                                    config.isAutoGroup(),
+                                    config.isPreAcknowledge(),
+                                    config.getLoadBalancingPolicyClassName(),
+                                    config.getTransactionBatchSize(),
+                                    config.getDupsOKBatchSize(),
+                                    config.getInitialWaitTimeout(),
+                                    config.isUseGlobalPools(),
+                                    config.getScheduledThreadPoolMaxSize(),
+                                    config.getThreadPoolMaxSize(),
+                                    config.getRetryInterval(),
+                                    config.getRetryIntervalMultiplier(),
+                                    config.getMaxRetryInterval(),
+                                    config.getReconnectAttempts(),
+                                    config.isFailoverOnServerShutdown(),
+                                    config.getGroupID(),
+                                    Arrays.asList(config.getBindings()));
+         }
+         else
+         {
+            createConnectionFactory(config.getName(),
+                                    config.getConnectorConfigs(),
+                                    config.getClientID(),
+                                    config.getClientFailureCheckPeriod(),
+                                    config.getConnectionTTL(),
+                                    config.getCallTimeout(),
+                                    config.isCacheLargeMessagesClient(),
+                                    config.getMinLargeMessageSize(),
+                                    config.getConsumerWindowSize(),
+                                    config.getConsumerMaxRate(),
+                                    config.getConfirmationWindowSize(),
+                                    config.getProducerWindowSize(),
+                                    config.getProducerMaxRate(),
+                                    config.isBlockOnAcknowledge(),
+                                    config.isBlockOnDurableSend(),
+                                    config.isBlockOnNonDurableSend(),
+                                    config.isAutoGroup(),
+                                    config.isPreAcknowledge(),
+                                    config.getLoadBalancingPolicyClassName(),
+                                    config.getTransactionBatchSize(),
+                                    config.getDupsOKBatchSize(),
+                                    config.isUseGlobalPools(),
+                                    config.getScheduledThreadPoolMaxSize(),
+                                    config.getThreadPoolMaxSize(),
+                                    config.getRetryInterval(),
+                                    config.getRetryIntervalMultiplier(),
+                                    config.getMaxRetryInterval(),
+                                    config.getReconnectAttempts(),
+                                    config.isFailoverOnServerShutdown(),
+                                    config.getGroupID(),
+                                    Arrays.asList(config.getBindings()));
+         }
+      }
+
+      List<QueueConfiguration> queueConfigs = config.getQueueConfigurations();
+      for (QueueConfiguration config : queueConfigs)
+      {
+         String[] bindings = config.getBindings();
+         for (String binding : bindings)
+         {
+            createQueue(config.getName(), binding, config.getSelector(), config.isDurable());
+         }
+      }
+
+      List<TopicConfiguration> topicConfigs = config.getTopicConfigurations();
+      for (TopicConfiguration config : topicConfigs)
+      {
+         String[] bindings = config.getBindings();
+         for (String binding : bindings)
+         {
+            createTopic(config.getName(), binding);
+         }
+      }
+   }
+
+}

Modified: trunk/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 import java.util.List;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 

Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 import java.util.List;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;

Deleted: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -1,862 +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.server.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-import org.hornetq.Pair;
-import org.hornetq.core.config.TransportConfiguration;
-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.HornetQQueue;
-import org.hornetq.jms.HornetQTopic;
-import org.hornetq.jms.client.HornetQConnectionFactory;
-import org.hornetq.jms.client.SelectorTranslator;
-import org.hornetq.jms.server.JMSServerManager;
-import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
-import org.hornetq.jms.server.config.JMSConfiguration;
-import org.hornetq.jms.server.config.QueueConfiguration;
-import org.hornetq.jms.server.config.TopicConfiguration;
-import org.hornetq.jms.server.management.JMSManagementService;
-import org.hornetq.jms.server.management.impl.JMSManagementServiceImpl;
-
-/**
- * A Deployer used to create and add to JNDI queues, topics and connection
- * factories. Typically this would only be used in an app server env.
- * 
- * JMS Connection Factories & Destinations can be configured either
- * using configuration files or using a JMSConfiguration object.
- * 
- * If configuration files are used, JMS resources are redeployed if the
- * files content is changed.
- * If a JMSConfiguration object is used, the JMS resources can not be
- * redeployed.
- *
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- * @author <a href="jmesnil at redhat.com">Jeff Mesnil</a>
- * @author <a href="tim.fox at jboss.com">Tim Fox</a>
- */
-public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
-{
-   private static final Logger log = Logger.getLogger(JMSServerManagerImpl.class);
-
-   private static final String REJECT_FILTER = "__HQX=-1";
-
-   /**
-    * the context to bind to
-    */
-   private Context context;
-
-   private final Map<String, List<String>> destinations = new HashMap<String, List<String>>();
-
-   private final Map<String, HornetQConnectionFactory> connectionFactories = new HashMap<String, HornetQConnectionFactory>();
-
-   private final Map<String, List<String>> connectionFactoryBindings = new HashMap<String, List<String>>();
-
-   private final HornetQServer server;
-
-   private JMSManagementService jmsManagementService;
-
-   private XmlDeployer jmsDeployer;
-
-   private boolean started;
-
-   private boolean active;
-
-   private DeploymentManager deploymentManager;
-
-   private final String configFileName;
-
-   private boolean contextSet;
-
-   private JMSConfiguration config;
-
-   public JMSServerManagerImpl(final HornetQServer server) throws Exception
-   {
-      this.server = server;
-
-      configFileName = null;
-   }
-
-   public JMSServerManagerImpl(final HornetQServer server, final String configFileName) throws Exception
-   {
-      this.server = server;
-
-      this.configFileName = configFileName;
-   }
-
-   public JMSServerManagerImpl(final HornetQServer server, final JMSConfiguration configuration) throws Exception
-   {
-      this.server = server;
-
-      configFileName = null;
-
-      config = configuration;
-   }
-
-   // ActivateCallback implementation -------------------------------------
-
-   public synchronized void activated()
-   {
-      active = true;
-
-      jmsManagementService = new JMSManagementServiceImpl(server.getManagementService());
-
-      try
-      {
-         jmsManagementService.registerJMSServer(this);
-
-         // start the JMS deployer only if the configuration is not done using the JMSConfiguration object
-         if (config == null)
-         {
-            jmsDeployer = new JMSServerDeployer(this, deploymentManager, server.getConfiguration());
-
-            if (configFileName != null)
-            {
-               jmsDeployer.setConfigFileNames(new String[] { configFileName });
-            }
-
-            jmsDeployer.start();
-
-            deploymentManager.start();
-         }
-         else
-         {
-            deploy();
-         }
-      }
-      catch (Exception e)
-      {
-         JMSServerManagerImpl.log.error("Failed to start jms deployer", e);
-      }
-   }
-
-   // HornetQComponent implementation -----------------------------------
-
-   public synchronized void start() throws Exception
-   {
-      if (started)
-      {
-         return;
-      }
-
-      if (!contextSet)
-      {
-         context = new InitialContext();
-      }
-
-      deploymentManager = new FileDeploymentManager(server.getConfiguration().getFileDeployerScanPeriod());
-
-      server.registerActivateCallback(this);
-
-      server.start();
-
-      started = true;
-   }
-
-   public synchronized void stop() throws Exception
-   {
-      if (!started)
-      {
-         return;
-      }
-
-      if (jmsDeployer != null)
-      {
-         jmsDeployer.stop();
-      }
-
-      if (deploymentManager != null)
-      {
-         deploymentManager.stop();
-      }
-
-      for (String destination : destinations.keySet())
-      {
-         undeployDestination(destination);
-      }
-
-      for (String connectionFactory : new HashSet<String>(connectionFactories.keySet()))
-      {
-         destroyConnectionFactory(connectionFactory);
-      }
-
-      destinations.clear();
-      connectionFactories.clear();
-      connectionFactoryBindings.clear();
-
-      if (context != null)
-      {
-         context.close();
-      }
-
-      jmsManagementService.unregisterJMSServer();
-
-      jmsManagementService.stop();
-
-      server.stop();
-
-      started = false;
-   }
-
-   public boolean isStarted()
-   {
-      return server.getHornetQServerControl().isStarted();
-   }
-
-   // JMSServerManager implementation -------------------------------
-
-   public HornetQServer getHornetQServer()
-   {
-      return server;
-   }
-
-   public synchronized void setContext(final Context context)
-   {
-      this.context = context;
-
-      contextSet = true;
-   }
-
-   public synchronized String getVersion()
-   {
-      checkInitialised();
-
-      return server.getHornetQServerControl().getVersion();
-   }
-
-   public synchronized boolean createQueue(final String queueName,
-                                           final String jndiBinding,
-                                           final String selectorString,
-                                           final boolean durable) throws Exception
-   {
-      checkInitialised();
-      HornetQQueue jBossQueue = new HornetQQueue(queueName);
-
-      // Convert from JMS selector to core filter
-      String coreFilterString = null;
-
-      if (selectorString != null)
-      {
-         coreFilterString = SelectorTranslator.convertToHornetQFilterString(selectorString);
-      }
-
-      server.getHornetQServerControl().deployQueue(jBossQueue.getAddress(),
-                                                   jBossQueue.getAddress(),
-                                                   coreFilterString,
-                                                   durable);
-
-      boolean added = bindToJndi(jndiBinding, jBossQueue);
-
-      if (added)
-      {
-         addToDestinationBindings(queueName, jndiBinding);
-      }
-
-      jmsManagementService.registerQueue(jBossQueue, jndiBinding);
-      return added;
-   }
-
-   public synchronized boolean createTopic(final String topicName, final String jndiBinding) throws Exception
-   {
-      checkInitialised();
-      HornetQTopic jBossTopic = new HornetQTopic(topicName);
-      // We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS
-      // checks when routing messages to a topic that
-      // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no
-      // subscriptions - core has no notion of a topic
-      server.getHornetQServerControl().deployQueue(jBossTopic.getAddress(),
-                                                   jBossTopic.getAddress(),
-                                                   JMSServerManagerImpl.REJECT_FILTER,
-                                                   true);
-      boolean added = bindToJndi(jndiBinding, jBossTopic);
-      if (added)
-      {
-         addToDestinationBindings(topicName, jndiBinding);
-      }
-      jmsManagementService.registerTopic(jBossTopic, jndiBinding);
-      return added;
-   }
-
-   public synchronized boolean undeployDestination(final String name) throws Exception
-   {
-      checkInitialised();
-      List<String> jndiBindings = destinations.get(name);
-      if (jndiBindings == null || jndiBindings.size() == 0)
-      {
-         return false;
-      }
-      if (context != null)
-      {
-         Iterator<String> iter = jndiBindings.iterator();
-         while (iter.hasNext())
-         {
-            String jndiBinding = iter.next();
-            context.unbind(jndiBinding);
-            iter.remove();
-         }
-      }
-      return true;
-   }
-
-   public synchronized boolean destroyQueue(final String name) throws Exception
-   {
-      checkInitialised();
-      undeployDestination(name);
-
-      destinations.remove(name);
-      jmsManagementService.unregisterQueue(name);
-      server.getHornetQServerControl().destroyQueue(HornetQQueue.createAddressFromName(name).toString());
-
-      return true;
-   }
-
-   public synchronized boolean destroyTopic(final String name) throws Exception
-   {
-      checkInitialised();
-      undeployDestination(name);
-
-      destinations.remove(name);
-      jmsManagementService.unregisterTopic(name);
-      server.getHornetQServerControl().destroyQueue(HornetQTopic.createAddressFromName(name).toString());
-
-      return true;
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(connectorConfigs);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
-                                                    final String clientID,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(connectorConfigs);
-         cf.setClientID(clientID);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
-                                                    final String clientID,
-                                                    final long clientFailureCheckPeriod,
-                                                    final long connectionTTL,
-                                                    final long callTimeout,
-                                                    final boolean cacheLargeMessagesClient,
-                                                    final int minLargeMessageSize,
-                                                    final int consumerWindowSize,
-                                                    final int consumerMaxRate,
-                                                    final int confirmationWindowSize,
-                                                    final int producerWindowSize,
-                                                    final int producerMaxRate,
-                                                    final boolean blockOnAcknowledge,
-                                                    final boolean blockOnDurableSend,
-                                                    final boolean blockOnNonDurableSend,
-                                                    final boolean autoGroup,
-                                                    final boolean preAcknowledge,
-                                                    final String loadBalancingPolicyClassName,
-                                                    final int transactionBatchSize,
-                                                    final int dupsOKBatchSize,
-                                                    final boolean useGlobalPools,
-                                                    final int scheduledThreadPoolMaxSize,
-                                                    final int threadPoolMaxSize,
-                                                    final long retryInterval,
-                                                    final double retryIntervalMultiplier,
-                                                    final long maxRetryInterval,
-                                                    final int reconnectAttempts,
-                                                    final boolean failoverOnServerShutdown,
-                                                    final String groupId,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(connectorConfigs);
-         cf.setClientID(clientID);
-         cf.setClientFailureCheckPeriod(clientFailureCheckPeriod);
-         cf.setConnectionTTL(connectionTTL);
-         cf.setCallTimeout(callTimeout);
-         cf.setCacheLargeMessagesClient(cacheLargeMessagesClient);
-         cf.setMinLargeMessageSize(minLargeMessageSize);
-         cf.setConsumerWindowSize(consumerWindowSize);
-         cf.setConsumerMaxRate(consumerMaxRate);
-         cf.setConfirmationWindowSize(confirmationWindowSize);
-         cf.setProducerWindowSize(producerWindowSize);
-         cf.setProducerMaxRate(producerMaxRate);
-         cf.setBlockOnAcknowledge(blockOnAcknowledge);
-         cf.setBlockOnDurableSend(blockOnDurableSend);
-         cf.setBlockOnNonDurableSend(blockOnNonDurableSend);
-         cf.setAutoGroup(autoGroup);
-         cf.setPreAcknowledge(preAcknowledge);
-         cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
-         cf.setTransactionBatchSize(transactionBatchSize);
-         cf.setDupsOKBatchSize(dupsOKBatchSize);
-         cf.setUseGlobalPools(useGlobalPools);
-         cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
-         cf.setThreadPoolMaxSize(threadPoolMaxSize);
-         cf.setRetryInterval(retryInterval);
-         cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
-         cf.setMaxRetryInterval(maxRetryInterval);
-         cf.setReconnectAttempts(reconnectAttempts);
-         cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
-         cf.setGroupID(groupId);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final String discoveryAddress,
-                                                    final int discoveryPort,
-                                                    final String clientID,
-                                                    final long discoveryRefreshTimeout,
-                                                    final long clientFailureCheckPeriod,
-                                                    final long connectionTTL,
-                                                    final long callTimeout,
-                                                    final boolean cacheLargeMessagesClient,
-                                                    final int minLargeMessageSize,
-                                                    final int consumerWindowSize,
-                                                    final int consumerMaxRate,
-                                                    final int confirmationWindowSize,
-                                                    final int producerWindowSize,
-                                                    final int producerMaxRate,
-                                                    final boolean blockOnAcknowledge,
-                                                    final boolean blockOnDurableSend,
-                                                    final boolean blockOnNonDurableSend,
-                                                    final boolean autoGroup,
-                                                    final boolean preAcknowledge,
-                                                    final String loadBalancingPolicyClassName,
-                                                    final int transactionBatchSize,
-                                                    final int dupsOKBatchSize,
-                                                    final long initialWaitTimeout,
-                                                    final boolean useGlobalPools,
-                                                    final int scheduledThreadPoolMaxSize,
-                                                    final int threadPoolMaxSize,
-                                                    final long retryInterval,
-                                                    final double retryIntervalMultiplier,
-                                                    final long maxRetryInterval,
-                                                    final int reconnectAttempts,
-                                                    final boolean failoverOnServerShutdown,
-                                                    final String groupId,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
-         cf.setClientID(clientID);
-         cf.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
-         cf.setClientFailureCheckPeriod(clientFailureCheckPeriod);
-         cf.setConnectionTTL(connectionTTL);
-         cf.setCallTimeout(callTimeout);
-         cf.setCacheLargeMessagesClient(cacheLargeMessagesClient);
-         cf.setMinLargeMessageSize(minLargeMessageSize);
-         cf.setConsumerWindowSize(consumerWindowSize);
-         cf.setConsumerMaxRate(consumerMaxRate);
-         cf.setConfirmationWindowSize(confirmationWindowSize);
-         cf.setProducerWindowSize(producerWindowSize);
-         cf.setProducerMaxRate(producerMaxRate);
-         cf.setBlockOnAcknowledge(blockOnAcknowledge);
-         cf.setBlockOnDurableSend(blockOnDurableSend);
-         cf.setBlockOnNonDurableSend(blockOnNonDurableSend);
-         cf.setAutoGroup(autoGroup);
-         cf.setPreAcknowledge(preAcknowledge);
-         cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
-         cf.setTransactionBatchSize(transactionBatchSize);
-         cf.setDupsOKBatchSize(dupsOKBatchSize);
-         cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
-         cf.setUseGlobalPools(useGlobalPools);
-         cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
-         cf.setThreadPoolMaxSize(threadPoolMaxSize);
-         cf.setRetryInterval(retryInterval);
-         cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
-         cf.setMaxRetryInterval(maxRetryInterval);
-         cf.setReconnectAttempts(reconnectAttempts);
-         cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final String discoveryAddress,
-                                                    final int discoveryPort,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final String discoveryAddress,
-                                                    final int discoveryPort,
-                                                    final String clientID,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(discoveryAddress, discoveryPort);
-         cf.setClientID(clientID);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final TransportConfiguration liveTC,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(liveTC);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final TransportConfiguration liveTC,
-                                                    final String clientID,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(liveTC);
-         cf.setClientID(clientID);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final TransportConfiguration liveTC,
-                                                    final TransportConfiguration backupTC,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(liveTC, backupTC);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized void createConnectionFactory(final String name,
-                                                    final TransportConfiguration liveTC,
-                                                    final TransportConfiguration backupTC,
-                                                    final String clientID,
-                                                    final List<String> jndiBindings) throws Exception
-   {
-      checkInitialised();
-      HornetQConnectionFactory cf = connectionFactories.get(name);
-      if (cf == null)
-      {
-         cf = new HornetQConnectionFactory(liveTC, backupTC);
-         cf.setClientID(clientID);
-      }
-
-      bindConnectionFactory(cf, name, jndiBindings);
-   }
-
-   public synchronized boolean destroyConnectionFactory(final String name) throws Exception
-   {
-      checkInitialised();
-      List<String> jndiBindings = connectionFactoryBindings.get(name);
-      if (jndiBindings == null || jndiBindings.size() == 0)
-      {
-         return false;
-      }
-      if (context != null)
-      {
-         for (String jndiBinding : jndiBindings)
-         {
-            try
-            {
-               context.unbind(jndiBinding);
-            }
-            catch (NameNotFoundException e)
-            {
-               // this is ok.
-            }
-         }
-      }
-      connectionFactoryBindings.remove(name);
-      connectionFactories.remove(name);
-
-      jmsManagementService.unregisterConnectionFactory(name);
-
-      return true;
-   }
-
-   public String[] listRemoteAddresses() throws Exception
-   {
-      checkInitialised();
-      return server.getHornetQServerControl().listRemoteAddresses();
-   }
-
-   public String[] listRemoteAddresses(final String ipAddress) throws Exception
-   {
-      checkInitialised();
-      return server.getHornetQServerControl().listRemoteAddresses(ipAddress);
-   }
-
-   public boolean closeConnectionsForAddress(final String ipAddress) throws Exception
-   {
-      checkInitialised();
-      return server.getHornetQServerControl().closeConnectionsForAddress(ipAddress);
-   }
-
-   public String[] listConnectionIDs() throws Exception
-   {
-      return server.getHornetQServerControl().listConnectionIDs();
-   }
-
-   public String[] listSessions(final String connectionID) throws Exception
-   {
-      checkInitialised();
-      return server.getHornetQServerControl().listSessions(connectionID);
-   }
-
-   // Public --------------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   private synchronized void checkInitialised()
-   {
-      if (!active)
-      {
-         throw new IllegalStateException("Cannot access JMS Server, core server is not yet active");
-      }
-   }
-
-   private void bindConnectionFactory(final HornetQConnectionFactory cf,
-                                      final String name,
-                                      final List<String> jndiBindings) throws Exception
-   {
-      for (String jndiBinding : jndiBindings)
-      {
-         bindToJndi(jndiBinding, cf);
-
-         if (connectionFactoryBindings.get(name) == null)
-         {
-            connectionFactoryBindings.put(name, new ArrayList<String>());
-         }
-         connectionFactoryBindings.get(name).add(jndiBinding);
-      }
-
-      jmsManagementService.registerConnectionFactory(name, cf, jndiBindings);
-   }
-
-   private boolean bindToJndi(final String jndiName, final Object objectToBind) throws NamingException
-   {
-      if (context != null)
-      {
-         String parentContext;
-         String jndiNameInContext;
-         int sepIndex = jndiName.lastIndexOf('/');
-         if (sepIndex == -1)
-         {
-            parentContext = "";
-         }
-         else
-         {
-            parentContext = jndiName.substring(0, sepIndex);
-         }
-         jndiNameInContext = jndiName.substring(sepIndex + 1);
-         try
-         {
-            context.lookup(jndiName);
-
-            JMSServerManagerImpl.log.warn("Binding for " + jndiName + " already exists");
-            return false;
-         }
-         catch (Throwable e)
-         {
-            // OK
-         }
-
-         Context c = org.hornetq.utils.JNDIUtil.createContext(context, parentContext);
-
-         c.rebind(jndiNameInContext, objectToBind);
-      }
-      return true;
-   }
-
-   private void addToDestinationBindings(final String destination, final String jndiBinding)
-   {
-      if (destinations.get(destination) == null)
-      {
-         destinations.put(destination, new ArrayList<String>());
-      }
-      destinations.get(destination).add(jndiBinding);
-   }
-
-   private void deploy() throws Exception
-   {
-      if (config == null)
-      {
-         return;
-      }
-
-      if (config.getContext() != null)
-      {
-         setContext(config.getContext());
-      }
-
-      List<ConnectionFactoryConfiguration> connectionFactoryConfigurations = config.getConnectionFactoryConfigurations();
-      for (ConnectionFactoryConfiguration config : connectionFactoryConfigurations)
-      {
-         if (config.getDiscoveryAddress() != null)
-         {
-            createConnectionFactory(config.getName(),
-                                    config.getDiscoveryAddress(),
-                                    config.getDiscoveryPort(),
-                                    config.getClientID(),
-                                    config.getDiscoveryRefreshTimeout(),
-                                    config.getClientFailureCheckPeriod(),
-                                    config.getConnectionTTL(),
-                                    config.getCallTimeout(),
-                                    config.isCacheLargeMessagesClient(),
-                                    config.getMinLargeMessageSize(),
-                                    config.getConsumerWindowSize(),
-                                    config.getConsumerMaxRate(),
-                                    config.getConfirmationWindowSize(),
-                                    config.getProducerWindowSize(),
-                                    config.getProducerMaxRate(),
-                                    config.isBlockOnAcknowledge(),
-                                    config.isBlockOnDurableSend(),
-                                    config.isBlockOnNonDurableSend(),
-                                    config.isAutoGroup(),
-                                    config.isPreAcknowledge(),
-                                    config.getLoadBalancingPolicyClassName(),
-                                    config.getTransactionBatchSize(),
-                                    config.getDupsOKBatchSize(),
-                                    config.getInitialWaitTimeout(),
-                                    config.isUseGlobalPools(),
-                                    config.getScheduledThreadPoolMaxSize(),
-                                    config.getThreadPoolMaxSize(),
-                                    config.getRetryInterval(),
-                                    config.getRetryIntervalMultiplier(),
-                                    config.getMaxRetryInterval(),
-                                    config.getReconnectAttempts(),
-                                    config.isFailoverOnServerShutdown(),
-                                    config.getGroupID(),
-                                    Arrays.asList(config.getBindings()));
-         }
-         else
-         {
-            createConnectionFactory(config.getName(),
-                                    config.getConnectorConfigs(),
-                                    config.getClientID(),
-                                    config.getClientFailureCheckPeriod(),
-                                    config.getConnectionTTL(),
-                                    config.getCallTimeout(),
-                                    config.isCacheLargeMessagesClient(),
-                                    config.getMinLargeMessageSize(),
-                                    config.getConsumerWindowSize(),
-                                    config.getConsumerMaxRate(),
-                                    config.getConfirmationWindowSize(),
-                                    config.getProducerWindowSize(),
-                                    config.getProducerMaxRate(),
-                                    config.isBlockOnAcknowledge(),
-                                    config.isBlockOnDurableSend(),
-                                    config.isBlockOnNonDurableSend(),
-                                    config.isAutoGroup(),
-                                    config.isPreAcknowledge(),
-                                    config.getLoadBalancingPolicyClassName(),
-                                    config.getTransactionBatchSize(),
-                                    config.getDupsOKBatchSize(),
-                                    config.isUseGlobalPools(),
-                                    config.getScheduledThreadPoolMaxSize(),
-                                    config.getThreadPoolMaxSize(),
-                                    config.getRetryInterval(),
-                                    config.getRetryIntervalMultiplier(),
-                                    config.getMaxRetryInterval(),
-                                    config.getReconnectAttempts(),
-                                    config.isFailoverOnServerShutdown(),
-                                    config.getGroupID(),
-                                    Arrays.asList(config.getBindings()));
-         }
-      }
-
-      List<QueueConfiguration> queueConfigs = config.getQueueConfigurations();
-      for (QueueConfiguration config : queueConfigs)
-      {
-         String[] bindings = config.getBindings();
-         for (String binding : bindings)
-         {
-            createQueue(config.getName(), binding, config.getSelector(), config.isDurable());
-         }
-      }
-
-      List<TopicConfiguration> topicConfigs = config.getTopicConfigurations();
-      for (TopicConfiguration config : topicConfigs)
-      {
-         String[] bindings = config.getBindings();
-         for (String binding : bindings)
-         {
-            createTopic(config.getName(), binding);
-         }
-      }
-   }
-
-}

Modified: trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSManagementService.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,9 +15,9 @@
 
 import java.util.List;
 
+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.management.JMSServerControl;
 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-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,9 +23,9 @@
 import org.hornetq.core.messagecounter.MessageCounter;
 import org.hornetq.core.messagecounter.MessageCounterManager;
 import org.hornetq.core.server.management.ManagementService;
+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.management.ConnectionFactoryControl;
 import org.hornetq.jms.management.JMSQueueControl;
 import org.hornetq.jms.management.JMSServerControl;

Modified: trunk/src/main/org/hornetq/jms/server/recovery/HornetQXAResourceWrapper.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/recovery/HornetQXAResourceWrapper.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/jms/server/recovery/HornetQXAResourceWrapper.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,8 +21,8 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.SessionFailureListener;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;

Modified: trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/ra/HornetQRAManagedConnectionFactory.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -72,7 +72,7 @@
    /**
     * Connection Factory used if properties are set
     */
-   private org.hornetq.jms.client.HornetQConnectionFactory connectionFactory;
+   private org.hornetq.jms.HornetQConnectionFactory connectionFactory;
 
    /**
     * Constructor
@@ -758,7 +758,7 @@
     *
     * @return The factory
     */
-   protected synchronized org.hornetq.jms.client.HornetQConnectionFactory getHornetQConnectionFactory() throws ResourceException
+   protected synchronized org.hornetq.jms.HornetQConnectionFactory getHornetQConnectionFactory() throws ResourceException
    {
 
       if (connectionFactory == null)

Modified: trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -29,7 +29,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
@@ -86,7 +86,7 @@
     */
    private final Map<ActivationSpec, HornetQActivation> activations;
 
-   private org.hornetq.jms.client.HornetQConnectionFactory defaultHornetQConnectionFactory;
+   private org.hornetq.jms.HornetQConnectionFactory defaultHornetQConnectionFactory;
 
    /**
     * Constructor
@@ -1353,7 +1353,7 @@
       sessionFactory = defaultHornetQConnectionFactory.getCoreFactory();
    }
 
-   public org.hornetq.jms.client.HornetQConnectionFactory getDefaultHornetQConnectionFactory() throws ResourceException
+   public org.hornetq.jms.HornetQConnectionFactory getDefaultHornetQConnectionFactory() throws ResourceException
    {
       if (!configured.getAndSet(true))
       {
@@ -1369,9 +1369,9 @@
       return defaultHornetQConnectionFactory;
    }
 
-   public org.hornetq.jms.client.HornetQConnectionFactory createHornetQConnectionFactory(final ConnectionFactoryProperties overrideProperties)
+   public org.hornetq.jms.HornetQConnectionFactory createHornetQConnectionFactory(final ConnectionFactoryProperties overrideProperties)
    {
-      org.hornetq.jms.client.HornetQConnectionFactory cf;
+      org.hornetq.jms.HornetQConnectionFactory cf;
       String connectorClassName = overrideProperties.getConnectorClassName() != null ? overrideProperties.getConnectorClassName()
                                                                                     : getConnectorClassName();
       String discoveryAddress = overrideProperties.getDiscoveryAddress() != null ? overrideProperties.getDiscoveryAddress()
@@ -1390,13 +1390,13 @@
                                                                          : new TransportConfiguration(backUpCOnnectorClassname,
                                                                                                       backupConnectionParams);
 
-         cf = new org.hornetq.jms.client.HornetQConnectionFactory(transportConf, backup);
+         cf = new org.hornetq.jms.HornetQConnectionFactory(transportConf, backup);
       }
       else if (discoveryAddress != null)
       {
          Integer discoveryPort = overrideProperties.getDiscoveryPort() != null ? overrideProperties.getDiscoveryPort()
                                                                               : getDiscoveryPort();
-         cf = new org.hornetq.jms.client.HornetQConnectionFactory(discoveryAddress, discoveryPort);
+         cf = new org.hornetq.jms.HornetQConnectionFactory(discoveryAddress, discoveryPort);
       }
       else
       {
@@ -1406,7 +1406,7 @@
       return cf;
    }
 
-   private void setParams(final org.hornetq.jms.client.HornetQConnectionFactory cf,
+   private void setParams(final org.hornetq.jms.HornetQConnectionFactory cf,
                           final ConnectionFactoryProperties overrideProperties)
    {
       Boolean val = overrideProperties.isAutoGroup() != null ? overrideProperties.isAutoGroup()

Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -97,7 +97,7 @@
 
    private final List<HornetQMessageHandler> handlers = new ArrayList<HornetQMessageHandler>();
 
-   private org.hornetq.jms.client.HornetQConnectionFactory factory;
+   private org.hornetq.jms.HornetQConnectionFactory factory;
 
    static
    {

Modified: trunk/src/main/org/hornetq/service/HornetQFileConfigurationService.java
===================================================================
--- trunk/src/main/org/hornetq/service/HornetQFileConfigurationService.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/service/HornetQFileConfigurationService.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -13,7 +13,7 @@
 package org.hornetq.service;
 
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.config.FileConfiguration;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>

Modified: trunk/src/main/org/hornetq/service/HornetQJMSStarterService.java
===================================================================
--- trunk/src/main/org/hornetq/service/HornetQJMSStarterService.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/service/HornetQJMSStarterService.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -12,7 +12,7 @@
  */
 package org.hornetq.service;
 
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>

Modified: trunk/src/main/org/hornetq/service/HornetQStarterService.java
===================================================================
--- trunk/src/main/org/hornetq/service/HornetQStarterService.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/src/main/org/hornetq/service/HornetQStarterService.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 import javax.management.ObjectName;
 
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.security.HornetQSecurityManager;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.impl.HornetQServerImpl;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,9 +22,9 @@
 import javax.jms.Session;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,9 +19,9 @@
 import javax.naming.InitialContext;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/ReferenceableTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -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.referenceable.ConnectionFactoryObjectFactory;
 import org.hornetq.jms.referenceable.DestinationObjectFactory;
 import org.hornetq.jms.tests.util.ProxyAssertSupport;

Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import javax.naming.InitialContext;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.ObjectNameBuilder;

Modified: trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,10 +28,10 @@
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.client.ClientRequestor;
 import org.hornetq.core.client.ClientSession;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.management.impl.ManagementHelper;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.tests.util.SpawnedVMSupport;

Modified: trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/SpawnedJMSServer.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,13 +20,13 @@
 import javax.naming.InitialContext;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.jms.server.JMSServerManager;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.jnp.server.Main;
 import org.jnp.server.NamingBeanImpl;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;

Modified: trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,10 +21,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,11 +20,11 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,10 +22,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,9 +23,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.impl.MessageImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,7 +21,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,9 +20,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.impl.MessageImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,16 +19,16 @@
 
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.RemotingConnection;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.client.HornetQSession;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.jms.server.management.NullInitialContext;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -7,11 +7,11 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.SendAcknowledgementHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.Message;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import java.util.concurrent.ScheduledExecutorService;
 
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.FailoverManagerImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.PreparedTransactionInfo;
 import org.hornetq.core.journal.RecordInfo;
 import org.hornetq.core.journal.impl.JournalImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,8 +26,8 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientConsumerInternal;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.Message;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,10 +24,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,10 +27,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.impl.MessageImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,10 +21,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,9 +20,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,10 +17,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,12 +22,12 @@
 import org.hornetq.core.client.ClientRequestor;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
 import org.hornetq.core.client.impl.ClientMessageImpl;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.tests.util.ServiceTestBase;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,10 +23,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,11 +19,11 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.RemotingConnection;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,11 +26,11 @@
 import org.hornetq.Pair;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.TransportConstants;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;

Modified: trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,9 +20,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,7 +21,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.Message;

Modified: trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientExitTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientExitTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientExitTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import org.hornetq.core.client.ClientConsumer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.Message;

Modified: trunk/tests/src/org/hornetq/tests/integration/clientcrash/CrashClient.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/clientcrash/CrashClient.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/clientcrash/CrashClient.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.jms.client.HornetQTextMessage;

Modified: trunk/tests/src/org/hornetq/tests/integration/clientcrash/GracefulClient.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/clientcrash/GracefulClient.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/clientcrash/GracefulClient.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,8 +17,8 @@
 import java.util.Map;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnector;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -31,13 +31,13 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
 import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.impl.MessageImpl;
 import org.hornetq.core.postoffice.Binding;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -32,8 +32,8 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.SessionFailureListener;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.TransportConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.SimpleString;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,8 +15,8 @@
 import java.util.Map;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,8 +15,8 @@
 import java.util.Map;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.JournalType;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/LargeMessageFailoverTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 
 import org.hornetq.core.buffers.HornetQBuffer;
 import org.hornetq.core.client.ClientMessage;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.tests.util.UnitTestCase;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,8 +15,8 @@
 
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,8 +28,8 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -13,11 +13,11 @@
 
 package org.hornetq.tests.integration.cluster.reattach;
 
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,12 +28,12 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.MessageHandler;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMRegistry;

Modified: trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,10 +22,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.TransportConstants;

Modified: trunk/tests/src/org/hornetq/tests/integration/http/NettyHttpTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/http/NettyHttpTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/http/NettyHttpTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,7 +23,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.buffers.HornetQBuffer;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.AbstractBufferHandler;
 import org.hornetq.core.remoting.spi.BufferHandler;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,17 +25,17 @@
 import javax.jms.Session;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.jms.HornetQTopic;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,16 +25,16 @@
 
 import org.hornetq.Pair;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.TransportConstants;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -33,20 +33,20 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.JMSConfiguration;
 import org.hornetq.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
 import org.hornetq.jms.server.config.impl.JMSConfigurationImpl;
 import org.hornetq.jms.server.config.impl.QueueConfigurationImpl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.UnitTestCase;
 

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -35,8 +35,8 @@
 import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
@@ -44,15 +44,15 @@
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.management.ManagementService;
+import org.hornetq.jms.HornetQConnectionFactory;
 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.management.JMSQueueControl;
 import org.hornetq.jms.management.TopicControl;
 import org.hornetq.jms.server.JMSServerManager;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.UnitTestCase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.tests.util.JMSTestBase;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/ReSendLargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/ReSendLargeMessageTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/ReSendLargeMessageTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -31,7 +31,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.jms.client.HornetQMessage;
 import org.hornetq.tests.util.JMSTestBase;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,7 +27,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.tests.util.JMSTestBase;
 import org.hornetq.tests.util.RandomUtil;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -33,8 +33,8 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.RemotingConnection;
@@ -42,8 +42,8 @@
 import org.hornetq.core.remoting.impl.invm.TransportConstants;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -32,17 +32,17 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.RemotingConnection;
 import org.hornetq.core.remoting.impl.invm.InVMRegistry;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
+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.HornetQSession;
 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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseConnectionOnGCTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,7 +26,7 @@
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.CloseListener;
 import org.hornetq.core.remoting.RemotingConnection;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.tests.util.JMSTestBase;
 import org.hornetq.tests.util.UnitTestCase;
 

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/CloseDestroyedConnectionTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,8 +26,8 @@
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.RemotingConnection;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,15 +24,15 @@
 
 import org.hornetq.core.client.impl.ClientSessionInternal;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
+import org.hornetq.jms.HornetQConnectionFactory;
 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.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.jms.server.management.NullInitialContext;
 import org.hornetq.tests.util.UnitTestCase;
 

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/consumer/ConsumerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,8 +27,8 @@
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.Queue;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-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/divert/DivertAndACKClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,17 +22,17 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.deployers.DeploymentManager;
 import org.hornetq.core.deployers.impl.FileDeploymentManager;
 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.HornetQConnectionFactory;
 import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.jms.server.impl.JMSServerDeployer;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.ServiceTestBase;
 import org.hornetq.tests.util.UnitTestCase;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,17 +22,17 @@
 
 import junit.framework.Assert;
 
+import org.hornetq.core.config.FileConfiguration;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.FileConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.security.HornetQSecurityManager;
 import org.hornetq.core.security.impl.HornetQSecurityManagerImpl;
 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.HornetQConnectionFactory;
 import org.hornetq.jms.server.JMSServerManager;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.util.UnitTestCase;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -27,6 +27,7 @@
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.impl.HornetQServerImpl;
 import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.JMSConfiguration;
 import org.hornetq.jms.server.config.TopicConfiguration;
@@ -34,7 +35,6 @@
 import org.hornetq.jms.server.config.impl.JMSConfigurationImpl;
 import org.hornetq.jms.server.config.impl.QueueConfigurationImpl;
 import org.hornetq.jms.server.config.impl.TopicConfigurationImpl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.ServiceTestBase;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -29,17 +29,17 @@
 
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.management.JMSQueueControl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.unit.util.InVMContext;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,12 +19,12 @@
 import javax.jms.QueueSession;
 import javax.jms.Session;
 
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.management.JMSQueueControl;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,8 +25,8 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
@@ -35,7 +35,7 @@
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
 import org.hornetq.jms.management.JMSServerControl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.unit.util.InVMContext;

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,11 +22,11 @@
 
 import junit.framework.Assert;
 
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.ObjectNameBuilder;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
@@ -36,7 +36,7 @@
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.jms.management.JMSServerControl;
 import org.hornetq.jms.server.JMSServerManager;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.unit.util.InVMContext;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,12 +19,12 @@
 import javax.jms.QueueSession;
 import javax.jms.Session;
 
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.jms.management.JMSServerControl;
 
 /**

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,7 +28,7 @@
 
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
-import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.hornetq.jms.HornetQConnectionFactory;
 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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,15 +22,15 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.jms.HornetQTopic;
 import org.hornetq.jms.management.SubscriptionInfo;
 import org.hornetq.jms.management.TopicControl;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementControlHelper;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.util.RandomUtil;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,16 +22,16 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
+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.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.integration.management.ManagementTestBase;
 import org.hornetq.tests.util.RandomUtil;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 
 import junit.framework.TestSuite;
 
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.SequentialFileFactory;
 import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
 import org.hornetq.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalImplTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/journal/AIOJournalImplTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import junit.framework.TestSuite;
 
 import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.SequentialFileFactory;
 import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
 import org.hornetq.core.logging.Logger;

Modified: trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,7 +21,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.journal.Journal;
 import org.hornetq.core.journal.LoaderCallback;
 import org.hornetq.core.journal.PreparedTransactionInfo;

Modified: trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.persistence.impl.journal.JournalStorageManager;
 import org.hornetq.core.persistence.impl.journal.LargeServerMessageImpl;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,7 +16,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.logging.impl.JULLogDelegate;
 import org.hornetq.core.logging.impl.JULLogDelegateFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,10 +20,10 @@
 import org.hornetq.SimpleString;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.AcceptorControl;
 import org.hornetq.core.management.NotificationType;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.AcceptorControl;
 import org.hornetq.core.management.ResourceNames;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,10 +23,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.AddressControl;
 import org.hornetq.core.management.RoleInfo;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,10 +21,10 @@
 import org.hornetq.SimpleString;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.AddressControl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,12 +23,12 @@
 
 import org.hornetq.Pair;
 import org.hornetq.SimpleString;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.BridgeControl;
 import org.hornetq.core.management.NotificationType;
 import org.hornetq.core.management.ObjectNameBuilder;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,12 +23,12 @@
 import org.hornetq.Pair;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ObjectNameBuilder;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,9 +20,9 @@
 
 import org.hornetq.Pair;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.BroadcastGroupControl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.BroadcastGroupControl;
 import org.hornetq.core.management.ResourceNames;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,14 +24,14 @@
 import junit.framework.Assert;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
 import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ClusterConnectionControl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,10 +26,10 @@
 import org.hornetq.Pair;
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ClusterConnectionControl;
 import org.hornetq.core.management.NotificationType;
 import org.hornetq.core.management.ObjectNameBuilder;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.ClusterConnectionControl;
 import org.hornetq.core.management.ResourceNames;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/CoreMessagingProxy.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/CoreMessagingProxy.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/CoreMessagingProxy.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 import org.hornetq.core.client.ClientRequestor;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.management.impl.ManagementHelper;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 
 /**
  * A MBeanUsingCoreMessage

Modified: trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,9 +16,9 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.DiscoveryGroupControl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/DiscoveryGroupControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.DiscoveryGroupControl;
 import org.hornetq.core.management.ResourceNames;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,10 +17,10 @@
 
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.DivertControl;
 import org.hornetq.core.management.ObjectNameBuilder;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.DivertControl;
 import org.hornetq.core.management.ResourceNames;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,8 +20,8 @@
 
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.HornetQServerControl;
 import org.hornetq.core.management.ObjectNameBuilder;
 import org.hornetq.core.management.QueueControl;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.management.HornetQServerControl;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,8 +17,8 @@
 import java.util.Map;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ObjectNameBuilder;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.TransportConstants;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 import org.hornetq.SimpleString;
 import org.hornetq.core.client.management.impl.ManagementHelper;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.AddressControl;
 import org.hornetq.core.management.QueueControl;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,11 +24,11 @@
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.management.impl.ManagementHelper;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,10 +23,10 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.DayCounterInfo;
 import org.hornetq.core.management.HornetQServerControl;
 import org.hornetq.core.management.MessageCounterInfo;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 import org.hornetq.SimpleString;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.management.QueueControl;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,10 +19,10 @@
 import org.hornetq.core.client.ClientRequestor;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.management.impl.ManagementHelper;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.management.ResourceNames;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -16,8 +16,8 @@
 import java.util.Set;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.security.Role;
 import org.hornetq.core.security.impl.HornetQSecurityManagerImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -14,8 +14,8 @@
 package org.hornetq.tests.integration.management;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -13,8 +13,8 @@
 
 package org.hornetq.tests.integration.management;
 
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,11 +26,11 @@
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.management.impl.ManagementHelper;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,7 +28,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,8 +21,8 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.SessionFailureListener;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
 import org.hornetq.core.client.impl.FailoverManagerImpl;
 import org.hornetq.core.config.Configuration;

Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;

Modified: trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationOrderTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,7 +23,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;

Modified: trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -32,7 +32,7 @@
 import org.hornetq.core.buffers.HornetQBuffer;
 import org.hornetq.core.buffers.HornetQBuffers;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.client.impl.FailoverManager;
 import org.hornetq.core.client.impl.FailoverManagerImpl;
 import org.hornetq.core.config.Configuration;

Modified: trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,8 +19,8 @@
 
 import junit.framework.Assert;
 
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/security/SimpleClient.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/security/SimpleClient.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/security/SimpleClient.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,7 +18,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.jms.client.HornetQTextMessage;

Modified: trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -28,9 +28,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -23,7 +23,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,9 +20,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.impl.MessageImpl;

Modified: trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.QueueConfiguration;

Modified: trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,9 +24,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.message.Message;

Modified: trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -31,9 +31,9 @@
 import org.hornetq.core.client.ClientProducer;
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/opt/SendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/opt/SendTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/opt/SendTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -29,8 +29,8 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.server.HornetQ;
@@ -39,8 +39,8 @@
 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.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-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/stress/journal/CompactingStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.message.Message;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.JournalType;

Modified: trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -25,7 +25,7 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.JournalType;

Modified: trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -31,7 +31,7 @@
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.journal.PreparedTransactionInfo;
 import org.hornetq.core.journal.RecordInfo;

Modified: trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,7 +17,7 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.exception.HornetQException;

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-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -41,20 +41,20 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
 import org.hornetq.core.server.HornetQ;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
 import org.hornetq.jms.bridge.ConnectionFactoryFactory;
 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.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -22,7 +22,7 @@
 
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.server.JournalType;
 import org.hornetq.tests.util.RandomUtil;
 import org.hornetq.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import junit.framework.Assert;
 
-import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.config.FileConfiguration;
 import org.hornetq.tests.util.UnitTestCase;
 import org.hornetq.utils.XMLUtil;
 import org.w3c.dom.Element;

Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -18,8 +18,8 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
-import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.config.ConfigurationImpl;
+import org.hornetq.core.config.FileConfiguration;
 
 /**
  * 

Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -17,13 +17,13 @@
 
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.FileConfiguration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.config.cluster.BridgeConfiguration;
 import org.hornetq.core.config.cluster.BroadcastGroupConfiguration;
 import org.hornetq.core.config.cluster.ClusterConnectionConfiguration;
 import org.hornetq.core.config.cluster.DiscoveryGroupConfiguration;
 import org.hornetq.core.config.cluster.DivertConfiguration;
-import org.hornetq.core.config.impl.FileConfiguration;
 import org.hornetq.core.server.JournalType;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -26,7 +26,7 @@
 import org.hornetq.Pair;
 import org.hornetq.SimpleString;
 import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.paging.PageTransactionInfo;
 import org.hornetq.core.paging.PagingManager;
 import org.hornetq.core.paging.PagingStore;

Modified: trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -19,7 +19,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.buffers.HornetQBuffer;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.AbstractBufferHandler;
 import org.hornetq.core.remoting.spi.Acceptor;

Modified: trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -20,7 +20,7 @@
 import junit.framework.Assert;
 
 import org.hornetq.core.buffers.HornetQBuffer;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.exception.HornetQException;
 import org.hornetq.core.remoting.impl.AbstractBufferHandler;
 import org.hornetq.core.remoting.spi.BufferHandler;

Modified: trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,7 +24,7 @@
 
 import junit.framework.Assert;
 
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;

Modified: trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -33,12 +33,12 @@
 
 import org.hornetq.core.client.ClientSession;
 import org.hornetq.core.client.ClientSessionFactory;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.remoting.impl.invm.InVMConnector;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyConnector;
+import org.hornetq.jms.HornetQConnectionFactory;
 import org.hornetq.jms.HornetQQueue;
-import org.hornetq.jms.client.HornetQConnectionFactory;
 import org.hornetq.ra.ConnectionFactoryProperties;
 import org.hornetq.ra.HornetQRAManagedConnectionFactory;
 import org.hornetq.ra.HornetQResourceAdapter;

Modified: trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -21,14 +21,14 @@
 import javax.naming.NamingException;
 
 import org.hornetq.Pair;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
 import org.hornetq.core.config.TransportConfiguration;
 import org.hornetq.core.server.HornetQ;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.integration.transports.netty.NettyAcceptorFactory;
 import org.hornetq.integration.transports.netty.NettyConnectorFactory;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+import org.hornetq.jms.server.JMSServerManagerImpl;
 import org.hornetq.tests.unit.util.InVMContext;
 
 /**

Modified: trunk/tests/src/org/hornetq/tests/util/ListJournal.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/ListJournal.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/util/ListJournal.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -15,7 +15,7 @@
 
 import java.util.ArrayList;
 
-import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.config.FileConfiguration;
 import org.hornetq.core.journal.PreparedTransactionInfo;
 import org.hornetq.core.journal.RecordInfo;
 import org.hornetq.core.journal.impl.JournalImpl;

Modified: trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java	2010-01-05 09:26:41 UTC (rev 8710)
+++ trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java	2010-01-05 10:23:17 UTC (rev 8711)
@@ -24,10 +24,10 @@
 
 import org.hornetq.core.client.ClientMessage;
 import org.hornetq.core.client.ClientSession;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.client.ClientSessionFactoryImpl;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.ConfigurationImpl;
 import org.hornetq.core.config.TransportConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
 import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;



More information about the hornetq-commits mailing list