JBoss hornetq SVN: r9990 - in trunk: src/main/org/hornetq/api/core and 22 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-12-03 14:17:35 -0500 (Fri, 03 Dec 2010)
New Revision: 9990
Added:
trunk/src/main/org/hornetq/api/core/DiscoveryGroupConfiguration.java
Removed:
trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java
Modified:
trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java
trunk/src/main/org/hornetq/api/core/client/HornetQClient.java
trunk/src/main/org/hornetq/api/core/client/ServerLocator.java
trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
trunk/src/main/org/hornetq/core/config/Configuration.java
trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
trunk/src/main/org/hornetq/core/server/management/ManagementService.java
trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.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/topology/HAClientTopologyWithDiscoveryTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.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/unit/core/config/impl/FileConfigurationTest.java
Log:
Moving DiscoveryGroupConfiguration into core.api
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-12-03 03:48:16 UTC (rev 9989)
+++ trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -21,9 +21,9 @@
import javax.jms.TextMessage;
import javax.jms.Topic;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.common.example.HornetQExample;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.jms.server.impl.JMSFactoryType;
/**
Copied: trunk/src/main/org/hornetq/api/core/DiscoveryGroupConfiguration.java (from rev 9986, trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java)
===================================================================
--- trunk/src/main/org/hornetq/api/core/DiscoveryGroupConfiguration.java (rev 0)
+++ trunk/src/main/org/hornetq/api/core/DiscoveryGroupConfiguration.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -0,0 +1,182 @@
+/*
+ * 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.api.core;
+
+import java.io.Serializable;
+
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.utils.UUIDGenerator;
+
+/**
+ * A DiscoveryGroupConfiguration
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ * Created 18 Nov 2008 08:47:30
+ *
+ *
+ */
+public class DiscoveryGroupConfiguration implements Serializable
+{
+ private static final long serialVersionUID = 8657206421727863400L;
+
+ private static final Logger log = Logger.getLogger(DiscoveryGroupConfiguration.class);
+
+
+ private String name;
+
+ private String localBindAddress;
+
+ private String groupAddress;
+
+ private int groupPort;
+
+ private long refreshTimeout;
+
+ private long discoveryInitialWaitTimeout;
+
+ public DiscoveryGroupConfiguration(final String name,
+ final String localBindAddress,
+ final String groupAddress,
+ final int groupPort,
+ final long refreshTimeout,
+ final long discoveryInitialWaitTimeout)
+ {
+ this.name = name;
+ this.groupAddress = groupAddress;
+ this.localBindAddress = localBindAddress;
+ this.groupPort = groupPort;
+ this.refreshTimeout = refreshTimeout;
+ this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
+ }
+
+ public DiscoveryGroupConfiguration(final String groupAddress,
+ final int groupPort)
+ {
+ this(UUIDGenerator.getInstance().generateStringUUID(), null, groupAddress, groupPort, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getLocalBindAddress()
+ {
+ return localBindAddress;
+ }
+
+ 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 localBindAddress the localBindAddress to set
+ */
+ public void setLocalBindAdress(final String localBindAddress)
+ {
+ this.localBindAddress = localBindAddress;
+ }
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @return the discoveryInitialWaitTimeout
+ */
+ public long getDiscoveryInitialWaitTimeout()
+ {
+ return discoveryInitialWaitTimeout;
+ }
+
+ /**
+ * @param discoveryInitialWaitTimeout the discoveryInitialWaitTimeout to set
+ */
+ public void setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout)
+ {
+ this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ DiscoveryGroupConfiguration that = (DiscoveryGroupConfiguration) o;
+
+ if (discoveryInitialWaitTimeout != that.discoveryInitialWaitTimeout) return false;
+ if (groupPort != that.groupPort) return false;
+ if (refreshTimeout != that.refreshTimeout) return false;
+ if (groupAddress != null ? !groupAddress.equals(that.groupAddress) : that.groupAddress != null) return false;
+ if (localBindAddress != null ? !localBindAddress.equals(that.localBindAddress) : that.localBindAddress != null)
+ return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = name != null ? name.hashCode() : 0;
+ result = 31 * result + (localBindAddress != null ? localBindAddress.hashCode() : 0);
+ result = 31 * result + (groupAddress != null ? groupAddress.hashCode() : 0);
+ result = 31 * result + groupPort;
+ result = 31 * result + (int) (refreshTimeout ^ (refreshTimeout >>> 32));
+ result = 31 * result + (int) (discoveryInitialWaitTimeout ^ (discoveryInitialWaitTimeout >>> 32));
+ return result;
+ }
+}
Modified: trunk/src/main/org/hornetq/api/core/client/HornetQClient.java
===================================================================
--- trunk/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -12,12 +12,12 @@
*/
package org.hornetq.api.core.client;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy;
import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.client.impl.ServerLocatorImpl;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import java.util.List;
Modified: trunk/src/main/org/hornetq/api/core/client/ServerLocator.java
===================================================================
--- trunk/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -13,11 +13,11 @@
package org.hornetq.api.core.client;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A ServerLocator
Modified: trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,8 +15,8 @@
import javax.jms.Queue;
import javax.jms.Topic;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.client.HornetQDestination;
Modified: trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -13,11 +13,11 @@
package org.hornetq.api.jms.management;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.management.Operation;
import org.hornetq.api.core.management.Parameter;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A ConnectionFactoryControl is used to manage a JMS ConnectionFactory.
Modified: trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -21,6 +21,7 @@
import java.util.*;
import java.util.concurrent.*;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.Pair;
@@ -33,7 +34,6 @@
import org.hornetq.core.cluster.DiscoveryGroup;
import org.hornetq.core.cluster.DiscoveryListener;
import org.hornetq.core.cluster.impl.DiscoveryGroupImpl;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.UUIDGenerator;
Modified: trunk/src/main/org/hornetq/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/Configuration.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/config/Configuration.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Set;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
Deleted: trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -1,182 +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;
-
-import java.io.Serializable;
-
-import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.utils.UUIDGenerator;
-
-/**
- * A DiscoveryGroupConfiguration
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- * Created 18 Nov 2008 08:47:30
- *
- *
- */
-public class DiscoveryGroupConfiguration implements Serializable
-{
- private static final long serialVersionUID = 8657206421727863400L;
-
- private static final Logger log = Logger.getLogger(DiscoveryGroupConfiguration.class);
-
-
- private String name;
-
- private String localBindAddress;
-
- private String groupAddress;
-
- private int groupPort;
-
- private long refreshTimeout;
-
- private long discoveryInitialWaitTimeout;
-
- public DiscoveryGroupConfiguration(final String name,
- final String localBindAddress,
- final String groupAddress,
- final int groupPort,
- final long refreshTimeout,
- final long discoveryInitialWaitTimeout)
- {
- this.name = name;
- this.groupAddress = groupAddress;
- this.localBindAddress = localBindAddress;
- this.groupPort = groupPort;
- this.refreshTimeout = refreshTimeout;
- this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
- }
-
- public DiscoveryGroupConfiguration(final String groupAddress,
- final int groupPort)
- {
- this(UUIDGenerator.getInstance().generateStringUUID(), null, groupAddress, groupPort, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT);
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getLocalBindAddress()
- {
- return localBindAddress;
- }
-
- 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 localBindAddress the localBindAddress to set
- */
- public void setLocalBindAdress(final String localBindAddress)
- {
- this.localBindAddress = localBindAddress;
- }
-
- /**
- * @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;
- }
-
- /**
- * @return the discoveryInitialWaitTimeout
- */
- public long getDiscoveryInitialWaitTimeout()
- {
- return discoveryInitialWaitTimeout;
- }
-
- /**
- * @param discoveryInitialWaitTimeout the discoveryInitialWaitTimeout to set
- */
- public void setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout)
- {
- this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- DiscoveryGroupConfiguration that = (DiscoveryGroupConfiguration) o;
-
- if (discoveryInitialWaitTimeout != that.discoveryInitialWaitTimeout) return false;
- if (groupPort != that.groupPort) return false;
- if (refreshTimeout != that.refreshTimeout) return false;
- if (groupAddress != null ? !groupAddress.equals(that.groupAddress) : that.groupAddress != null) return false;
- if (localBindAddress != null ? !localBindAddress.equals(that.localBindAddress) : that.localBindAddress != null)
- return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result = name != null ? name.hashCode() : 0;
- result = 31 * result + (localBindAddress != null ? localBindAddress.hashCode() : 0);
- result = 31 * result + (groupAddress != null ? groupAddress.hashCode() : 0);
- result = 31 * result + groupPort;
- result = 31 * result + (int) (refreshTimeout ^ (refreshTimeout >>> 32));
- result = 31 * result + (int) (discoveryInitialWaitTimeout ^ (discoveryInitialWaitTimeout >>> 32));
- return result;
- }
-}
Modified: trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -21,6 +21,7 @@
import java.util.Map;
import java.util.Set;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.BridgeConfiguration;
@@ -29,7 +30,6 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.ConnectorServiceConfiguration;
import org.hornetq.core.config.CoreQueueConfiguration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.DivertConfiguration;
import org.hornetq.core.logging.impl.JULLogDelegateFactory;
import org.hornetq.core.security.Role;
Modified: trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
===================================================================
--- trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -23,12 +23,12 @@
import java.util.Map;
import java.util.Set;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.core.config.*;
-import org.hornetq.core.config.ConnectorServiceConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.config.impl.FileConfiguration;
import org.hornetq.core.config.impl.Validators;
Modified: trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -22,6 +22,7 @@
import java.util.concurrent.ScheduledFuture;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
Modified: trunk/src/main/org/hornetq/core/server/management/ManagementService.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/management/ManagementService.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/core/server/management/ManagementService.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -18,6 +18,7 @@
import javax.management.ObjectName;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.ObjectNameBuilder;
@@ -26,7 +27,6 @@
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.DivertConfiguration;
import org.hornetq.core.management.impl.HornetQServerControlImpl;
import org.hornetq.core.messagecounter.MessageCounterManager;
Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -26,11 +26,11 @@
import javax.naming.Reference;
import javax.naming.Referenceable;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
Modified: trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -17,9 +17,9 @@
import javax.jms.QueueConnectionFactory;
import javax.jms.TopicConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,9 +15,9 @@
import javax.jms.QueueConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a QueueConnectionFactory.
Modified: trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,9 +15,9 @@
import javax.jms.TopicConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a TopicConnectionFactory.
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -20,9 +20,9 @@
import javax.jms.XAQueueConnectionFactory;
import javax.jms.XATopicConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XAConnectionFactory.
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,9 +15,9 @@
import javax.jms.XAQueueConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XAQueueConnectionFactory.
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,9 +15,9 @@
import javax.jms.XATopicConnectionFactory;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XATopicConnectionFactory.
Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -17,10 +17,10 @@
import javax.management.NotCompliantMBeanException;
import javax.management.StandardMBean;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.Parameter;
import org.hornetq.api.jms.management.ConnectionFactoryControl;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.management.impl.MBeanInfoHelper;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.server.JMSServerManager;
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -19,11 +19,11 @@
import java.util.ArrayList;
import java.util.List;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.Validators;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.server.JMSServerConfigParser;
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -22,6 +22,7 @@
import javax.naming.NamingException;
import javax.transaction.xa.Xid;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
@@ -29,7 +30,6 @@
import org.hornetq.api.core.management.ResourceNames;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.deployers.DeploymentManager;
import org.hornetq.core.deployers.impl.FileDeploymentManager;
import org.hornetq.core.deployers.impl.XmlDeployer;
Modified: trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -29,13 +29,13 @@
import javax.transaction.TransactionManager;
import javax.transaction.xa.XAResource;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.server.impl.JMSFactoryType;
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -22,6 +22,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
@@ -29,7 +30,6 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -20,6 +20,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientConsumer;
@@ -32,7 +33,6 @@
import org.hornetq.core.config.BridgeConfiguration;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.CoreQueueConfiguration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -24,6 +24,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Message;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
@@ -37,7 +38,6 @@
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.postoffice.Binding;
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -13,9 +13,9 @@
package org.hornetq.tests.integration.cluster.topology;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -23,9 +23,9 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.jms.server.impl.JMSFactoryType;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.core.config.BroadcastGroupConfiguration;
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -21,9 +21,9 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.deployers.DeploymentManager;
import org.hornetq.core.deployers.impl.FileDeploymentManager;
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-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -34,6 +34,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.AddressControl;
@@ -41,7 +42,6 @@
import org.hornetq.api.core.management.ResourceNames;
import org.hornetq.api.jms.management.JMSServerControl;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.postoffice.QueueBinding;
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -23,6 +23,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
@@ -30,7 +31,6 @@
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.CoreQueueConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2010-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -23,6 +23,7 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
@@ -32,7 +33,6 @@
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.CoreQueueConfiguration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
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-12-03 03:48:16 UTC (rev 9989)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2010-12-03 19:17:35 UTC (rev 9990)
@@ -15,13 +15,13 @@
import junit.framework.Assert;
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.BridgeConfiguration;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.DivertConfiguration;
import org.hornetq.core.config.impl.FileConfiguration;
import org.hornetq.core.security.Role;
14 years, 1 month
JBoss hornetq SVN: r9989 - tags.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-12-02 22:48:16 -0500 (Thu, 02 Dec 2010)
New Revision: 9989
Added:
tags/HornetQ_2_2_0_QA2/
Log:
new snapshot for QA/EAP integration
Copied: tags/HornetQ_2_2_0_QA2 (from rev 9988, trunk)
14 years, 1 month
JBoss hornetq SVN: r9988 - trunk.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-12-02 21:50:41 -0500 (Thu, 02 Dec 2010)
New Revision: 9988
Modified:
trunk/build-maven.xml
Log:
changing build-maven
Modified: trunk/build-maven.xml
===================================================================
--- trunk/build-maven.xml 2010-12-03 02:42:45 UTC (rev 9987)
+++ trunk/build-maven.xml 2010-12-03 02:50:41 UTC (rev 9988)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.0.QA1"/>
+ <property name="hornetq.version" value="2.2.0.QA2"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
14 years, 1 month
JBoss hornetq SVN: r9987 - trunk/tests/joram-tests/src/org/hornetq/jms.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-12-02 21:42:45 -0500 (Thu, 02 Dec 2010)
New Revision: 9987
Modified:
trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
Log:
Fixing JORAM tests
Modified: trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-02 21:51:09 UTC (rev 9986)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-03 02:42:45 UTC (rev 9987)
@@ -114,6 +114,7 @@
"createConnectionFactory",
name,
false,
+ false,
cfType,
"netty",
name);
14 years, 1 month
JBoss hornetq SVN: r9986 - in branches/Branch_Large_Message_Compression/src/main/org/hornetq: utils and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-12-02 16:51:09 -0500 (Thu, 02 Dec 2010)
New Revision: 9986
Modified:
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionInternal.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/DelegatingSession.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManager.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
branches/Branch_Large_Message_Compression/src/main/org/hornetq/utils/DecompressedLargeMessageBuffer.java
Log:
just removing the thread pool
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -552,7 +552,7 @@
if (currentChunkMessage.isCompressed())
{
- currentChunkMessage.setBuffer(new DecompressedLargeMessageBuffer(currentLargeMessageBuffer, session.getThreadPool()));
+ currentChunkMessage.setBuffer(new DecompressedLargeMessageBuffer(currentLargeMessageBuffer));
}
else
{
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -272,15 +272,6 @@
// ClientSession implementation
// -----------------------------------------------------------------
- /**
- * This will be used for instance when compressin large messages.
- * the compression has to be done through a PipedOutputStream, and that needs to be done on a different thread
- */
- public Executor getThreadPool()
- {
- return failoverManager.getThreadPool();
- }
-
public void createQueue(final SimpleString address, final SimpleString queueName) throws HornetQException
{
internalCreateQueue(address, queueName, null, false, false);
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionInternal.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionInternal.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/ClientSessionInternal.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -13,8 +13,6 @@
package org.hornetq.core.client.impl;
-import java.util.concurrent.Executor;
-
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Message;
import org.hornetq.api.core.SimpleString;
@@ -89,6 +87,4 @@
void setAddress(Message message, SimpleString address);
void setPacketSize(int packetSize);
-
- Executor getThreadPool();
}
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/DelegatingSession.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/DelegatingSession.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/DelegatingSession.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -14,7 +14,6 @@
package org.hornetq.core.client.impl;
import java.util.Set;
-import java.util.concurrent.Executor;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
@@ -564,12 +563,4 @@
{
return session.isCompressLargeMessages();
}
-
- /* (non-Javadoc)
- * @see org.hornetq.core.client.impl.ClientSessionInternal#getThreadPool()
- */
- public Executor getThreadPool()
- {
- return session.getThreadPool();
- }
}
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManager.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManager.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManager.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -66,6 +66,4 @@
boolean removeFailureListener(SessionFailureListener listener);
void causeExit();
-
- Executor getThreadPool();
}
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -298,11 +298,6 @@
}
// FailoverManager implementation ------------------------------------------------------------------
-
- public Executor getThreadPool()
- {
- return threadPool;
- }
public ClientSession createSession(final String username,
final String password,
Modified: branches/Branch_Large_Message_Compression/src/main/org/hornetq/utils/DecompressedLargeMessageBuffer.java
===================================================================
--- branches/Branch_Large_Message_Compression/src/main/org/hornetq/utils/DecompressedLargeMessageBuffer.java 2010-12-02 18:08:38 UTC (rev 9985)
+++ branches/Branch_Large_Message_Compression/src/main/org/hornetq/utils/DecompressedLargeMessageBuffer.java 2010-12-02 21:51:09 UTC (rev 9986)
@@ -44,18 +44,14 @@
private static final String OPERATION_NOT_SUPPORTED = "Operation not supported";
- private static final String READ_ONLY_ERROR_MESSAGE = "This is a read-only buffer, setOperations are not supported";
-
// Attributes ----------------------------------------------------
final LargeMessageBufferInternal bufferDelegate;
-
- private long readerIndex = 0;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
- public DecompressedLargeMessageBuffer(final LargeMessageBufferInternal bufferDelegate, Executor executor)
+ public DecompressedLargeMessageBuffer(final LargeMessageBufferInternal bufferDelegate)
{
this.bufferDelegate = bufferDelegate;
}
14 years, 1 month
JBoss hornetq SVN: r9985 - in trunk: src/main/org/hornetq/api/core/client and 15 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-12-02 13:08:38 -0500 (Thu, 02 Dec 2010)
New Revision: 9985
Modified:
trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java
trunk/src/main/org/hornetq/api/core/client/HornetQClient.java
trunk/src/main/org/hornetq/api/core/client/ServerLocator.java
trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
trunk/src/main/org/hornetq/api/jms/management/JMSServerControl.java
trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java
trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
trunk/src/main/org/hornetq/jms/client/HornetQConnection.java
trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
trunk/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.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/unit/ra/ResourceAdapterTest.java
Log:
use discoverygroupconfig everywhere
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-12-02 09:37:21 UTC (rev 9984)
+++ trunk/examples/jms/symmetric-cluster/src/org/hornetq/jms/example/SymmetricClusterExample.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -23,6 +23,7 @@
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.common.example.HornetQExample;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.jms.server.impl.JMSFactoryType;
/**
@@ -80,7 +81,9 @@
// connection factory directly we avoid having to worry about a JNDI look-up.
// In an app server environment you could use HA-JNDI to lookup from the clustered JNDI servers without
// having to know about a specific one.
- ConnectionFactory cf = (ConnectionFactory)HornetQJMSClient.createConnectionFactoryWithHA("231.7.7.7", 9876, JMSFactoryType.CF);
+ DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration("231.7.7.7", 9876);
+
+ ConnectionFactory cf = (ConnectionFactory)HornetQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.CF);
// We give a little while for each server to broadcast its whereabouts to the client
Thread.sleep(2000);
Modified: trunk/src/main/org/hornetq/api/core/client/HornetQClient.java
===================================================================
--- trunk/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy;
import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.client.impl.ServerLocatorImpl;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import java.util.List;
@@ -116,9 +117,9 @@
* @param discoveryPort the UDP port to listen for updates
* @return the ServerLocator
*/
- public static ServerLocator createServerLocatorWithoutHA(String discoveryAddress, final int discoveryPort)
+ public static ServerLocator createServerLocatorWithoutHA(final DiscoveryGroupConfiguration groupConfiguration)
{
- return new ServerLocatorImpl(false, discoveryAddress, discoveryPort);
+ return new ServerLocatorImpl(false, groupConfiguration);
}
/**
@@ -145,9 +146,9 @@
* @param discoveryPort the UDP port to listen for updates
* @return the ServerLocator
*/
- public static ServerLocator createServerLocatorWithHA(String discoveryAddress, final int discoveryPort)
+ public static ServerLocator createServerLocatorWithHA(final DiscoveryGroupConfiguration groupConfiguration)
{
- return new ServerLocatorImpl(true, discoveryAddress, discoveryPort);
+ return new ServerLocatorImpl(true, groupConfiguration);
}
Modified: trunk/src/main/org/hornetq/api/core/client/ServerLocator.java
===================================================================
--- trunk/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A ServerLocator
@@ -358,39 +359,6 @@
void setAckBatchSize(int ackBatchSize);
/**
- * Returns the local bind address to which the multicast socket is bound for discovery.
- *
- * This is null if the multicast socket is not bound, or no discovery is being used
- *
- * @return the local bind address to which the multicast socket is bound for discovery
- */
- String getLocalBindAddress();
-
- /**
- * Sets the local bind address to which the multicast socket is bound for discovery.
- *
- * @param localBindAddress the local bind address
- */
- void setLocalBindAddress(String localBindAddress);
-
- /**
- * Returns the address to listen to discover which connectors this factory can use.
- * The discovery address must be set to enable this factory to discover HornetQ servers.
- *
- * @return the address to listen to discover which connectors this factory can use
- */
- String getDiscoveryAddress();
-
- /**
- * Returns the port to listen to discover which connectors this factory can use.
- * The discovery port must be set to enable this factory to discover HornetQ servers.
- *
- * @return the port to listen to discover which connectors this factory can use
- */
- int getDiscoveryPort();
-
-
- /**
* Returns an array of TransportConfigurations representing the static list of live servers used when
* creating this object
* @return
@@ -398,45 +366,11 @@
TransportConfiguration[] getStaticTransportConfigurations();
/**
- * Returns the refresh timeout for discovered HornetQ servers.
- *
- * 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 {@link HornetQClient#DEFAULT_DISCOVERY_REFRESH_TIMEOUT}.
- *
- * @return the refresh timeout for discovered HornetQ servers
+ * The discovery group configuration
*/
- long getDiscoveryRefreshTimeout();
+ DiscoveryGroupConfiguration getDiscoveryGroupConfiguration();
/**
- * Sets the refresh timeout for discovered HornetQ servers.
- *
- * Value must be greater than 0.
- *
- * @param discoveryRefreshTimeout refresh timeout (in milliseconds) for discovered HornetQ servers
- */
- void setDiscoveryRefreshTimeout(long discoveryRefreshTimeout);
-
- /**
- * Returns the initial wait timeout if this factory is configured to use discovery.
- *
- * Value is in milliseconds, default value is {@link HornetQClient#DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT}.
- *
- * @return the initial wait timeout if this factory is configured to use discovery
- */
- long getDiscoveryInitialWaitTimeout();
-
- /**
- * Sets the initial wait timeout if this factory is configured to use discovery.
- *
- * Value is in milliseconds and must be greater than 0.
- *
- * @param initialWaitTimeout initial wait timeout when using discovery
- */
- void setDiscoveryInitialWaitTimeout(long initialWaitTimeout);
-
- /**
* Returns whether this factory will use global thread pools (shared among all the factories in the same JVM)
* or its own pools.
*
Modified: trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/api/jms/HornetQJMSClient.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -16,6 +16,7 @@
import javax.jms.Topic;
import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.client.HornetQDestination;
@@ -46,32 +47,32 @@
* @param discoveryPort the UDP port to listen for updates
* @return the HornetQConnectionFactory
*/
- public static HornetQConnectionFactory createConnectionFactoryWithHA(final String discoveryAddress, final int discoveryPort, JMSFactoryType jmsFactoryType)
+ public static HornetQConnectionFactory createConnectionFactoryWithHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)
{
HornetQConnectionFactory factory = null;
if (jmsFactoryType.equals(JMSFactoryType.CF))
{
- factory = new HornetQJMSConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQJMSConnectionFactory(true, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF))
{
- factory = new HornetQQueueConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQQueueConnectionFactory(true, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF))
{
- factory = new HornetQTopicConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQTopicConnectionFactory(true, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.XA_CF))
{
- factory = new HornetQXAConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQXAConnectionFactory(true, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF))
{
- factory = new HornetQXAQueueConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQXAQueueConnectionFactory(true, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF))
{
- factory = new HornetQXATopicConnectionFactory(true, discoveryAddress, discoveryPort);
+ factory = new HornetQXATopicConnectionFactory(true, groupConfiguration);
}
return factory;
@@ -86,32 +87,32 @@
* @param discoveryPort the UDP port to listen for updates
* @return the HornetQConnectionFactory
*/
- public static HornetQConnectionFactory createConnectionFactoryWithoutHA(final String discoveryAddress, final int discoveryPort, JMSFactoryType jmsFactoryType)
+ public static HornetQConnectionFactory createConnectionFactoryWithoutHA(final DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)
{
HornetQConnectionFactory factory = null;
if (jmsFactoryType.equals(JMSFactoryType.CF))
{
- factory = new HornetQJMSConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQJMSConnectionFactory(false, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_CF))
{
- factory = new HornetQQueueConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQQueueConnectionFactory(false, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_CF))
{
- factory = new HornetQTopicConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQTopicConnectionFactory(false, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.XA_CF))
{
- factory = new HornetQXAConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQXAConnectionFactory(false, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.QUEUE_XA_CF))
{
- factory = new HornetQXAQueueConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQXAQueueConnectionFactory(false, groupConfiguration);
}
else if (jmsFactoryType.equals(JMSFactoryType.TOPIC_XA_CF))
{
- factory = new HornetQXATopicConnectionFactory(false, discoveryAddress, discoveryPort);
+ factory = new HornetQXATopicConnectionFactory(false, groupConfiguration);
}
return factory;
Modified: trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.management.Operation;
import org.hornetq.api.core.management.Parameter;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A ConnectionFactoryControl is used to manage a JMS ConnectionFactory.
@@ -42,6 +43,12 @@
String[] getJNDIBindings();
/**
+ * does ths cf support HA
+ * @return true if it supports HA
+ */
+ boolean isHA();
+
+ /**
* Returns the Client ID of this connection factory (or {@code null} if it is not set.
*/
String getClientID();
@@ -247,27 +254,8 @@
*/
void setFailoverOnInitialConnection(boolean failoverOnInitialConnection);
- /**
- * @see org.hornetq.api.core.client.ClientSessionFactory#getDiscoveryRefreshTimeout()
- */
- long getDiscoveryRefreshTimeout();
/**
- * @see ClientSessionFactory#setDiscoveryRefreshTimeout(long)
- */
- void setDiscoveryRefreshTimeout(long discoveryRefreshTimeout);
-
- /**
- * @see org.hornetq.api.core.client.ClientSessionFactory#getDiscoveryInitialWaitTimeout()
- */
- long getDiscoveryInitialWaitTimeout();
-
- /**
- * @see ClientSessionFactory#setDiscoveryInitialWaitTimeout(long)
- */
- void setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout);
-
- /**
* @see org.hornetq.api.core.client.ClientSessionFactory#getProducerWindowSize()
*/
int getProducerWindowSize();
@@ -363,25 +351,10 @@
TransportConfiguration[] getStaticConnectors();
/**
- * @see ClientSessionFactory#getLocalBindAddress()
+ * get the discovery group configuration
*/
- String getLocalBindAddress();
+ DiscoveryGroupConfiguration getDiscoveryGroupConfiguration();
- /**
- * @see ClientSessionFactory#setLocalBindAddress(String)
- */
- void setLocalBindAddress(String localBindAddress);
-
- /**
- * @see ClientSessionFactory#getDiscoveryAddress()
- */
- String getDiscoveryAddress();
-
- /**
- * @see ClientSessionFactory#getDiscoveryPort()
- */
- int getDiscoveryPort();
-
/**
* Add the JNDI binding to this destination
*/
Modified: trunk/src/main/org/hornetq/api/jms/management/JMSServerControl.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/management/JMSServerControl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/api/jms/management/JMSServerControl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -143,6 +143,7 @@
*/
void createConnectionFactory(String name,
boolean ha,
+ boolean useDiscovery,
@Parameter(name = "cfType", desc = "RegularCF=0, QueueCF=1, TopicCF=2, XACF=3, QueueXACF=4, TopicXACF=5") int cfType,
String[] connectorNames,
Object[] bindings) throws Exception;
@@ -156,43 +157,11 @@
@Operation(desc = "Create a JMS ConnectionFactory", impact = MBeanOperationInfo.ACTION)
void createConnectionFactory(@Parameter(name = "name") String name,
@Parameter(name = "ha") boolean ha,
+ @Parameter(name = "useDiscovery", desc = "should we use discovery or a connector configuration") boolean useDiscovery,
@Parameter(name = "cfType", desc = "RegularCF=0, QueueCF=1, TopicCF=2, XACF=3, QueueXACF=4, TopicXACF=5") int cfType,
- @Parameter(name = "connectorNames", desc = "comma-separated list of connectorNames") String connectors,
+ @Parameter(name = "connectorNames", desc = "comma-separated list of connectorNames or the discovery group name") String connectors,
@Parameter(name = "jndiBindings", desc = "comma-separated list of JNDI bindings (use ',' if u need to use commas in your jndi name)") String jndiBindings) throws Exception;
- /**
- * Create a JMS ConnectionFactory with the specified name using a discovery group to discover HornetQ servers.
- * <br>
- * The ConnectionFactory is bound to JNDI for all the specified bindings Strings.
- * <br>
- * This factory listens to the specified {@code discoveryAddress} and {@code discoveryPort} to discover which servers it can connect to.
- *
- * @see #createConnectionFactory(String, Object[], Object[], Object[], Object[])
- */
- void createConnectionFactoryDiscovery(String name,
- boolean ha,
- @Parameter(name = "cfType", desc = "RegularCF=0, QueueCF=1, TopicCF=2, XACF=3, QueueXACF=4, TopicXACF=5") int cfType,
- @Parameter(name = "discoveryGroupName", desc="Refereced at the main configuration, it's the name of the config with automatic discovery") String discoveryGroupName,
- @Parameter(name = "jndiBindings", desc="Comma separated JNDI Bindings") String bindings) throws Exception;
-
- /**
- * Create a JMS ConnectionFactory with the specified name using a discovery group to discover HornetQ servers.
- * <br>
- * The ConnectionFactory is bound to JNDI for all the specified bindings Strings.
- * <br>
- * This factory listens to the specified {@code discoveryAddress} and {@code discoveryPort} to discover which servers it can connect to.
- *
- * @see #createConnectionFactory(String, Object[], Object[], Object[], Object[])
- */
- void createConnectionFactoryDiscovery(String name,
- boolean ha,
- @Parameter(name = "cfType", desc = "RegularCF=0, QueueCF=1, TopicCF=2, XACF=3, QueueXACF=4, TopicXACF=5") int cfType,
- @Parameter(name = "discoveryGroupName", desc="Refereced at the main configuration, it's the name of the config with automatic discovery") String discoveryGroupName,
- Object[] bindings) throws Exception;
-
- /**
- * Destroy the ConnectionFactory corresponding to the specified name.
- */
@Operation(desc = "Destroy a JMS ConnectionFactory", impact = MBeanOperationInfo.ACTION)
void destroyConnectionFactory(@Parameter(name = "name", desc = "Name of the ConnectionFactory to destroy") String name) throws Exception;
Modified: trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -33,6 +33,7 @@
import org.hornetq.core.cluster.DiscoveryGroup;
import org.hornetq.core.cluster.DiscoveryListener;
import org.hornetq.core.cluster.impl.DiscoveryGroupImpl;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.UUIDGenerator;
@@ -52,16 +53,14 @@
private boolean clusterConnection;
- private final String discoveryAddress;
-
- private final int discoveryPort;
-
private final Set<ClusterTopologyListener> topologyListeners = new HashSet<ClusterTopologyListener>();
private Set<ClientSessionFactory> factories = new HashSet<ClientSessionFactory>();
private TransportConfiguration[] initialConnectors;
+ private DiscoveryGroupConfiguration discoveryGroupConfiguration;
+
private StaticConnector staticConnector = new StaticConnector();
private Topology topology = new Topology();
@@ -84,12 +83,6 @@
private boolean cacheLargeMessagesClient;
- private String localBindAddress;
-
- private long discoveryRefreshTimeout;
-
- private long discoveryInitialWaitTimeout;
-
private long clientFailureCheckPeriod;
private long connectionTTL;
@@ -267,15 +260,15 @@
instantiateLoadBalancingPolicy();
- if (discoveryAddress != null)
+ if (discoveryGroupConfiguration != null)
{
- InetAddress groupAddress = InetAddress.getByName(discoveryAddress);
+ InetAddress groupAddress = InetAddress.getByName(discoveryGroupConfiguration.getGroupAddress());
InetAddress lbAddress;
- if (localBindAddress != null)
+ if (discoveryGroupConfiguration.getLocalBindAddress() != null)
{
- lbAddress = InetAddress.getByName(localBindAddress);
+ lbAddress = InetAddress.getByName(discoveryGroupConfiguration.getLocalBindAddress());
}
else
{
@@ -283,11 +276,11 @@
}
discoveryGroup = new DiscoveryGroupImpl(nodeID,
- discoveryAddress,
+ discoveryGroupConfiguration.getName(),
lbAddress,
groupAddress,
- discoveryPort,
- discoveryRefreshTimeout);
+ discoveryGroupConfiguration.getGroupPort(),
+ discoveryGroupConfiguration.getRefreshTimeout());
discoveryGroup.registerListener(this);
@@ -299,17 +292,14 @@
}
private ServerLocatorImpl(final boolean useHA,
- final String discoveryAddress,
- final int discoveryPort,
+ final DiscoveryGroupConfiguration discoveryGroupConfiguration,
final TransportConfiguration[] transportConfigs)
{
e.fillInStackTrace();
this.ha = useHA;
- this.discoveryAddress = discoveryAddress;
+ this.discoveryGroupConfiguration = discoveryGroupConfiguration;
- this.discoveryPort = discoveryPort;
-
this.initialConnectors = transportConfigs;
this.nodeID = UUIDGenerator.getInstance().generateStringUUID();
@@ -346,8 +336,6 @@
connectionLoadBalancingPolicyClassName = HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
- discoveryInitialWaitTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
-
useGlobalPools = HornetQClient.DEFAULT_USE_GLOBAL_POOLS;
scheduledThreadPoolMaxSize = HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
@@ -381,9 +369,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public ServerLocatorImpl(final boolean useHA, final String discoveryAddress, final int discoveryPort)
+ public ServerLocatorImpl(final boolean useHA, final DiscoveryGroupConfiguration groupConfiguration)
{
- this(useHA, discoveryAddress, discoveryPort, null);
+ this(useHA, groupConfiguration, null);
}
/**
@@ -393,7 +381,7 @@
*/
public ServerLocatorImpl(final boolean useHA, final TransportConfiguration... transportConfigs)
{
- this(useHA, null, -1, transportConfigs);
+ this(useHA, null, transportConfigs);
}
private TransportConfiguration selectConnector()
@@ -493,7 +481,7 @@
if (initialConnectors == null && discoveryGroup != null)
{
// Wait for an initial broadcast to give us at least one node in the cluster
- long timeout = clusterConnection?0:discoveryInitialWaitTimeout;
+ long timeout = clusterConnection?0:discoveryGroupConfiguration.getDiscoveryInitialWaitTimeout();
boolean ok = discoveryGroup.waitForBroadcast(timeout);
if (!ok)
@@ -777,17 +765,6 @@
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;
@@ -898,35 +875,14 @@
connectionLoadBalancingPolicyClassName = loadBalancingPolicyClassName;
}
- public synchronized String getLocalBindAddress()
- {
- return localBindAddress;
- }
-
- public synchronized void setLocalBindAddress(final String localBindAddress)
- {
- checkWrite();
- this.localBindAddress = localBindAddress;
- }
-
- public synchronized String getDiscoveryAddress()
- {
- return discoveryAddress;
- }
-
- public synchronized int getDiscoveryPort()
- {
- return discoveryPort;
- }
-
public TransportConfiguration[] getStaticTransportConfigurations()
{
return this.initialConnectors;
}
- public synchronized long getDiscoveryRefreshTimeout()
+ public DiscoveryGroupConfiguration getDiscoveryGroupConfiguration()
{
- return discoveryRefreshTimeout;
+ return discoveryGroupConfiguration;
}
public void addInterceptor(final Interceptor interceptor)
@@ -939,12 +895,6 @@
return interceptors.remove(interceptor);
}
- public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
- {
- checkWrite();
- this.discoveryRefreshTimeout = discoveryRefreshTimeout;
- }
-
public synchronized int getInitialMessagePacketSize()
{
return initialMessagePacketSize;
Modified: trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/core/config/DiscoveryGroupConfiguration.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -15,7 +15,9 @@
import java.io.Serializable;
+import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.core.logging.Logger;
+import org.hornetq.utils.UUIDGenerator;
/**
* A DiscoveryGroupConfiguration
@@ -60,6 +62,12 @@
this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
}
+ public DiscoveryGroupConfiguration(final String groupAddress,
+ final int groupPort)
+ {
+ this(UUIDGenerator.getInstance().generateStringUUID(), null, groupAddress, groupPort, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT);
+ }
+
public String getName()
{
return name;
@@ -140,6 +148,35 @@
{
this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
}
-
-
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ DiscoveryGroupConfiguration that = (DiscoveryGroupConfiguration) o;
+
+ if (discoveryInitialWaitTimeout != that.discoveryInitialWaitTimeout) return false;
+ if (groupPort != that.groupPort) return false;
+ if (refreshTimeout != that.refreshTimeout) return false;
+ if (groupAddress != null ? !groupAddress.equals(that.groupAddress) : that.groupAddress != null) return false;
+ if (localBindAddress != null ? !localBindAddress.equals(that.localBindAddress) : that.localBindAddress != null)
+ return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = name != null ? name.hashCode() : 0;
+ result = 31 * result + (localBindAddress != null ? localBindAddress.hashCode() : 0);
+ result = 31 * result + (groupAddress != null ? groupAddress.hashCode() : 0);
+ result = 31 * result + groupPort;
+ result = 31 * result + (int) (refreshTimeout ^ (refreshTimeout >>> 32));
+ result = 31 * result + (int) (discoveryInitialWaitTimeout ^ (discoveryInitialWaitTimeout >>> 32));
+ return result;
+ }
}
Modified: trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -636,13 +636,11 @@
if (config.isHA())
{
- serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(discoveryGroupConfiguration.getGroupAddress(),
- discoveryGroupConfiguration.getGroupPort());
+ serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(discoveryGroupConfiguration);
}
else
{
- serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(discoveryGroupConfiguration.getGroupAddress(),
- discoveryGroupConfiguration.getGroupPort());
+ serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(discoveryGroupConfiguration);
}
}
@@ -755,7 +753,7 @@
"'. The cluster connection will not be deployed.");
}
- serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(dg.getGroupAddress(), dg.getGroupPort());
+ serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(dg);
serverLocator.setNodeID(nodeUUID.toString());
serverLocator.setReconnectAttempts(-1);
clusterLocators.add(serverLocator);
@@ -818,9 +816,8 @@
"'. The cluster connection will not be deployed.");
}
- backupServerLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(dg.getGroupAddress(), dg.getGroupPort());
+ backupServerLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(dg);
backupServerLocator.setReconnectAttempts(-1);
- backupServerLocator.setDiscoveryInitialWaitTimeout(0);
}
else
{
Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnection.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnection.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnection.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -115,6 +115,8 @@
private final Exception creationStack;
+ private HornetQConnectionFactory factoryReference;
+
// Constructors ---------------------------------------------------------------------------------
public HornetQConnection(final String username,
@@ -589,6 +591,11 @@
}
}
+ public void setReference(HornetQConnectionFactory factory)
+ {
+ this.factoryReference = factory;
+ }
+
// Inner classes --------------------------------------------------------------------------------
private static class JMSFailureListener implements SessionFailureListener
Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -30,6 +30,7 @@
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
@@ -75,15 +76,15 @@
this.serverLocator = serverLocator;
}
- public HornetQConnectionFactory(final boolean ha, final String discoveryAddress, final int discoveryPort)
+ public HornetQConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
if (ha)
{
- serverLocator = HornetQClient.createServerLocatorWithHA(discoveryAddress, discoveryPort);
+ serverLocator = HornetQClient.createServerLocatorWithHA(groupConfiguration);
}
else
{
- serverLocator = HornetQClient.createServerLocatorWithoutHA(discoveryAddress, discoveryPort);
+ serverLocator = HornetQClient.createServerLocatorWithoutHA(groupConfiguration);
}
}
@@ -183,6 +184,11 @@
// Public ---------------------------------------------------------------------------------------
+ public boolean isHA()
+ {
+ return serverLocator.isHA();
+ }
+
public synchronized String getConnectionLoadBalancingPolicyClassName()
{
return serverLocator.getConnectionLoadBalancingPolicyClassName();
@@ -199,49 +205,11 @@
return serverLocator.getStaticTransportConfigurations();
}
- public synchronized String getLocalBindAddress()
+ public synchronized DiscoveryGroupConfiguration getDiscoveryGroupConfiguration()
{
- return serverLocator.getLocalBindAddress();
+ return serverLocator.getDiscoveryGroupConfiguration();
}
- public synchronized void setLocalBindAddress(final String localBindAddress)
- {
- checkWrite();
- serverLocator.setLocalBindAddress(localBindAddress);
- }
-
- public synchronized String getDiscoveryAddress()
- {
- return serverLocator.getDiscoveryAddress();
- }
-
- public synchronized int getDiscoveryPort()
- {
- return serverLocator.getDiscoveryPort();
- }
-
- public synchronized long getDiscoveryRefreshTimeout()
- {
- return serverLocator.getDiscoveryRefreshTimeout();
- }
-
- public synchronized void setDiscoveryRefreshTimeout(final long discoveryRefreshTimeout)
- {
- checkWrite();
- serverLocator.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
- }
-
- public synchronized long getDiscoveryInitialWaitTimeout()
- {
- return serverLocator.getDiscoveryInitialWaitTimeout();
- }
-
- public synchronized void setDiscoveryInitialWaitTimeout(final long discoveryInitialWaitTimeout)
- {
- checkWrite();
- serverLocator.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
- }
-
public synchronized String getClientID()
{
return clientID;
@@ -688,7 +656,7 @@
factory);
}
}
-
+ connection.setReference(this);
try
{
connection.authorize();
@@ -718,6 +686,18 @@
}
}
+ public void finalize() throws Throwable
+ {
+ try
+ {
+ serverLocator.close();
+ }
+ catch (Exception e)
+ {
+ //not much we can do here
+ }
+ super.finalize();
+ }
// Inner classes --------------------------------------------------------------------------------
}
Modified: trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQJMSConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -19,6 +19,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
@@ -52,9 +53,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQJMSConnectionFactory(boolean ha, String discoveryAddress, int discoveryPort)
+ public HornetQJMSConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a QueueConnectionFactory.
@@ -49,9 +50,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQQueueConnectionFactory(boolean ha, String discoveryAddress, int discoveryPort)
+ public HornetQQueueConnectionFactory(boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a TopicConnectionFactory.
@@ -50,9 +51,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQTopicConnectionFactory(final boolean ha, final String discoveryAddress, final int discoveryPort)
+ public HornetQTopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -22,6 +22,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XAConnectionFactory.
@@ -55,9 +56,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQXAConnectionFactory(final boolean ha, final String discoveryAddress, final int discoveryPort)
+ public HornetQXAConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XAQueueConnectionFactory.
@@ -49,9 +50,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQXAQueueConnectionFactory(final boolean ha, final String discoveryAddress, final int discoveryPort)
+ public HornetQXAQueueConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
/**
* A class that represents a XATopicConnectionFactory.
@@ -49,9 +50,9 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public HornetQXATopicConnectionFactory(final boolean ha, final String discoveryAddress, final int discoveryPort)
+ public HornetQXATopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
{
- super(ha, discoveryAddress, discoveryPort);
+ super(ha, groupConfiguration);
}
/**
Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -20,6 +20,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.Parameter;
import org.hornetq.api.jms.management.ConnectionFactoryControl;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.management.impl.MBeanInfoHelper;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.server.JMSServerManager;
@@ -65,6 +66,11 @@
return jmsManager.getJNDIOnConnectionFactory(name);
}
+ public boolean isHA()
+ {
+ return cf.isHA();
+ }
+
public String getClientID()
{
return cf.getClientID();
@@ -75,31 +81,11 @@
return cf.getClientFailureCheckPeriod();
}
- public long getDiscoveryRefreshTimeout()
- {
- return cf.getDiscoveryRefreshTimeout();
- }
-
public String getConnectionLoadBalancingPolicyClassName()
{
return cf.getConnectionLoadBalancingPolicyClassName();
}
- public void setDiscoveryRefreshTimeout(long discoveryRefreshTimeout)
- {
- cf.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
- }
-
- public long getDiscoveryInitialWaitTimeout()
- {
- return cf.getDiscoveryInitialWaitTimeout();
- }
-
- public void setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout)
- {
- cf.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
- }
-
public void setClientID(String clientID)
{
cf.setClientID(clientID);
@@ -290,26 +276,11 @@
return cf.getStaticConnectors();
}
- public String getLocalBindAddress()
+ public DiscoveryGroupConfiguration getDiscoveryGroupConfiguration()
{
- return cf.getLocalBindAddress();
+ return cf.getDiscoveryGroupConfiguration();
}
- public void setLocalBindAddress(String localBindAddress)
- {
- cf.setLocalBindAddress(localBindAddress);
- }
-
- public String getDiscoveryAddress()
- {
- return cf.getDiscoveryAddress();
- }
-
- public int getDiscoveryPort()
- {
- return cf.getDiscoveryPort();
- }
-
public void addJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception
{
jmsManager.addConnectionFactoryToJNDI(name, jndi);
Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -159,9 +159,10 @@
*/
public void createConnectionFactory(String name,
boolean ha,
+ boolean useDiscovery,
int cfType,
String[] connectorNames,
- Object[] jndiBindings) throws Exception
+ Object[] bindings) throws Exception
{
checkStarted();
@@ -169,19 +170,35 @@
try
{
- List<String> connectorList = new ArrayList<String>(connectorNames.length);
-
- for (String str : connectorNames)
+ if(useDiscovery)
{
- connectorList.add(str);
- }
-
- server.createConnectionFactory(name,
+ if(connectorNames == null || connectorNames.length == 0)
+ {
+ throw new IllegalArgumentException("no discovery group name supplied");
+ }
+ server.createConnectionFactory(name,
ha,
JMSFactoryType.valueOf(cfType),
- connectorList,
- JMSServerControlImpl.convert(jndiBindings));
+ connectorNames[0],
+ JMSServerControlImpl.convert(bindings));
+ }
+ else
+ {
+ List<String> connectorList = new ArrayList<String>(connectorNames.length);
+ for (String str : connectorNames)
+ {
+ connectorList.add(str);
+ }
+
+ server.createConnectionFactory(name,
+ ha,
+ JMSFactoryType.valueOf(cfType),
+ connectorList,
+ JMSServerControlImpl.convert(bindings));
+ }
+
+
sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);
}
finally
@@ -196,55 +213,11 @@
* The ConnectionFactory is bound to JNDI for all the specified bindings Strings.
*
*/
- public void createConnectionFactory(String name, boolean ha, int cfType, String connectors, String jndiBindings) throws Exception
+ public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String jndiBindings) throws Exception
{
-
- createConnectionFactory(name, ha, cfType, toArray(connectors), toArray(jndiBindings));
-
+ createConnectionFactory(name, ha, useDiscovery, cfType, toArray(connectors), toArray(jndiBindings));
}
- /**
- * Look at the iterface for the javadoc
- */
- public void createConnectionFactoryDiscovery(String name,
- boolean ha,
- int cfType,
- String discoveryGroupName,
- Object[] bindings) throws Exception
- {
- checkStarted();
-
- clearIO();
-
- try
- {
- server.createConnectionFactory(name,
- ha,
- JMSFactoryType.valueOf(cfType),
- discoveryGroupName,
- JMSServerControlImpl.convert(bindings));
-
- sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);
- }
- finally
- {
- blockOnIO();
- }
-
- }
-
- /**
- * Look at the iterface for the javadoc
- */
- public void createConnectionFactoryDiscovery(String name,
- boolean ha,
- int cfType,
- String discoveryGroupName,
- String jndiBindings) throws Exception
- {
- createConnectionFactoryDiscovery(name, ha, cfType, discoveryGroupName, toArray(jndiBindings));
- }
-
public boolean createQueue(final String name) throws Exception
{
return createQueue(name, null, null, true);
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -1012,19 +1012,12 @@
if (cfConfig.isHA())
{
- cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig.getGroupAddress(),
- groupConfig.getGroupPort(),
- cfConfig.getFactoryType());
+ cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig, cfConfig.getFactoryType());
}
else
{
- cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfig.getGroupAddress(),
- groupConfig.getGroupPort(),
- cfConfig.getFactoryType());
+ cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfig, cfConfig.getFactoryType());
}
- cf.setLocalBindAddress(groupConfig.getLocalBindAddress());
- cf.setDiscoveryRefreshTimeout(groupConfig.getRefreshTimeout());
- cf.setDiscoveryInitialWaitTimeout(groupConfig.getDiscoveryInitialWaitTimeout());
}
else
{
Modified: trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
--- trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -35,6 +35,7 @@
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.jms.HornetQJMSClient;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.server.impl.JMSFactoryType;
@@ -1404,14 +1405,26 @@
{
Integer discoveryPort = overrideProperties.getDiscoveryPort() != null ? overrideProperties.getDiscoveryPort()
: getDiscoveryPort();
-
+
+ DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration(discoveryAddress, discoveryPort);
+
+ long refreshTimeout = overrideProperties.getDiscoveryRefreshTimeout() != null ? overrideProperties.getDiscoveryRefreshTimeout()
+ : raProperties.getDiscoveryRefreshTimeout();
+
+ long initialTimeout = overrideProperties.getDiscoveryInitialWaitTimeout() != null ? overrideProperties.getDiscoveryInitialWaitTimeout()
+ : raProperties.getDiscoveryInitialWaitTimeout();
+
+ groupConfiguration.setDiscoveryInitialWaitTimeout(initialTimeout);
+
+ groupConfiguration.setRefreshTimeout(refreshTimeout);
+
if (ha)
{
- cf = HornetQJMSClient.createConnectionFactoryWithHA(discoveryAddress, discoveryPort, JMSFactoryType.XA_CF);
+ cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.XA_CF);
}
else
{
- cf = HornetQJMSClient.createConnectionFactoryWithoutHA(discoveryAddress, discoveryPort, JMSFactoryType.XA_CF);
+ cf = HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF);
}
}
else
@@ -1583,18 +1596,7 @@
{
cf.setConnectionTTL(val3);
}
- val3 = overrideProperties.getDiscoveryInitialWaitTimeout() != null ? overrideProperties.getDiscoveryInitialWaitTimeout()
- : raProperties.getDiscoveryInitialWaitTimeout();
- if (val3 != null)
- {
- cf.setDiscoveryInitialWaitTimeout(val3);
- }
- val3 = overrideProperties.getDiscoveryRefreshTimeout() != null ? overrideProperties.getDiscoveryRefreshTimeout()
- : raProperties.getDiscoveryRefreshTimeout();
- if (val3 != null)
- {
- cf.setDiscoveryRefreshTimeout(val3);
- }
+
val3 = overrideProperties.getRetryInterval() != null ? overrideProperties.getRetryInterval()
: raProperties.getRetryInterval();
if (val3 != null)
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -29,6 +29,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
@@ -50,10 +51,8 @@
{
private static final Logger log = Logger.getLogger(SessionFactoryTest.class);
- private final String groupAddress = getUDPDiscoveryAddress();
+ private DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration(getUDPDiscoveryAddress(), getUDPDiscoveryPort());
- private final int groupPort = getUDPDiscoveryPort();
-
private HornetQServer liveService;
private TransportConfiguration liveTC;
@@ -113,13 +112,11 @@
public void testDiscoveryConstructor() throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(groupAddress, groupPort);
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(groupConfiguration);
assertFactoryParams(locator,
null,
- groupAddress,
- groupPort,
- 0,
+ groupConfiguration,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
HornetQClient.DEFAULT_CALL_TIMEOUT,
@@ -135,7 +132,6 @@
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE,
HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
HornetQClient.DEFAULT_ACK_BATCH_SIZE,
- HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
HornetQClient.DEFAULT_USE_GLOBAL_POOLS,
HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -160,8 +156,6 @@
assertFactoryParams(locator,
tc,
null,
- -1,
- 0,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
HornetQClient.DEFAULT_CALL_TIMEOUT,
@@ -177,7 +171,6 @@
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE,
HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
HornetQClient.DEFAULT_ACK_BATCH_SIZE,
- HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT,
HornetQClient.DEFAULT_USE_GLOBAL_POOLS,
HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
@@ -200,7 +193,6 @@
TransportConfiguration[] tc = new TransportConfiguration[] { liveTC };
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(tc);
- long discoveryRefreshTimeout = RandomUtil.randomPositiveLong();
long clientFailureCheckPeriod = RandomUtil.randomPositiveLong();
long connectionTTL = RandomUtil.randomPositiveLong();
long callTimeout = RandomUtil.randomPositiveLong();
@@ -216,7 +208,6 @@
boolean preAcknowledge = RandomUtil.randomBoolean();
String loadBalancingPolicyClassName = RandomUtil.randomString();
int ackBatchSize = RandomUtil.randomPositiveInt();
- long initialWaitTimeout = RandomUtil.randomPositiveLong();
boolean useGlobalPools = RandomUtil.randomBoolean();
int scheduledThreadPoolMaxSize = RandomUtil.randomPositiveInt();
int threadPoolMaxSize = RandomUtil.randomPositiveInt();
@@ -224,7 +215,6 @@
double retryIntervalMultiplier = RandomUtil.randomDouble();
int reconnectAttempts = RandomUtil.randomPositiveInt();
- locator.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
locator.setClientFailureCheckPeriod(clientFailureCheckPeriod);
locator.setConnectionTTL(connectionTTL);
locator.setCallTimeout(callTimeout);
@@ -240,7 +230,6 @@
locator.setPreAcknowledge(preAcknowledge);
locator.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
locator.setAckBatchSize(ackBatchSize);
- locator.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
locator.setUseGlobalPools(useGlobalPools);
locator.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
locator.setThreadPoolMaxSize(threadPoolMaxSize);
@@ -249,9 +238,6 @@
locator.setReconnectAttempts(reconnectAttempts);
assertEqualsTransportConfigurations(tc, locator.getStaticTransportConfigurations());
- Assert.assertEquals(null, locator.getDiscoveryAddress());
- Assert.assertEquals(-1, locator.getDiscoveryPort());
- Assert.assertEquals(discoveryRefreshTimeout, locator.getDiscoveryRefreshTimeout());
Assert.assertEquals(clientFailureCheckPeriod, locator.getClientFailureCheckPeriod());
Assert.assertEquals(connectionTTL, locator.getConnectionTTL());
Assert.assertEquals(callTimeout, locator.getCallTimeout());
@@ -268,7 +254,6 @@
Assert.assertEquals(loadBalancingPolicyClassName, locator
.getConnectionLoadBalancingPolicyClassName());
Assert.assertEquals(ackBatchSize, locator.getAckBatchSize());
- Assert.assertEquals(initialWaitTimeout, locator.getDiscoveryInitialWaitTimeout());
Assert.assertEquals(useGlobalPools, locator.isUseGlobalPools());
Assert.assertEquals(scheduledThreadPoolMaxSize, locator.getScheduledThreadPoolMaxSize());
Assert.assertEquals(threadPoolMaxSize, locator.getThreadPoolMaxSize());
@@ -280,7 +265,6 @@
private void testSettersThrowException(final ClientSessionFactory cf)
{
- long discoveryRefreshTimeout = RandomUtil.randomPositiveLong();
long clientFailureCheckPeriod = RandomUtil.randomPositiveLong();
long connectionTTL = RandomUtil.randomPositiveLong();
long callTimeout = RandomUtil.randomPositiveLong();
@@ -296,7 +280,6 @@
boolean preAcknowledge = RandomUtil.randomBoolean();
String loadBalancingPolicyClassName = RandomUtil.randomString();
int ackBatchSize = RandomUtil.randomPositiveInt();
- long initialWaitTimeout = RandomUtil.randomPositiveLong();
boolean useGlobalPools = RandomUtil.randomBoolean();
int scheduledThreadPoolMaxSize = RandomUtil.randomPositiveInt();
int threadPoolMaxSize = RandomUtil.randomPositiveInt();
@@ -306,15 +289,6 @@
try
{
- cf.getServerLocator().setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
- try
- {
cf.getServerLocator().setClientFailureCheckPeriod(clientFailureCheckPeriod);
Assert.fail("Should throw exception");
}
@@ -450,15 +424,6 @@
}
try
{
- cf.getServerLocator().setDiscoveryInitialWaitTimeout(initialWaitTimeout);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
- try
- {
cf.getServerLocator().setUseGlobalPools(useGlobalPools);
Assert.fail("Should throw exception");
}
@@ -513,9 +478,6 @@
}
cf.getServerLocator().getStaticTransportConfigurations();
- cf.getServerLocator().getDiscoveryAddress();
- cf.getServerLocator().getDiscoveryPort();
- cf.getServerLocator().getDiscoveryRefreshTimeout();
cf.getServerLocator().getClientFailureCheckPeriod();
cf.getServerLocator().getConnectionTTL();
cf.getServerLocator().getCallTimeout();
@@ -531,7 +493,6 @@
cf.getServerLocator().isPreAcknowledge();
cf.getServerLocator().getConnectionLoadBalancingPolicyClassName();
cf.getServerLocator().getAckBatchSize();
- cf.getServerLocator().getDiscoveryInitialWaitTimeout();
cf.getServerLocator().isUseGlobalPools();
cf.getServerLocator().getScheduledThreadPoolMaxSize();
cf.getServerLocator().getThreadPoolMaxSize();
@@ -543,9 +504,7 @@
private void assertFactoryParams(final ServerLocator locator,
final TransportConfiguration[] staticConnectors,
- final String discoveryAddress,
- final int discoveryPort,
- final long discoveryRefreshTimeout,
+ final DiscoveryGroupConfiguration discoveryGroupConfiguration,
final long clientFailureCheckPeriod,
final long connectionTTL,
final long callTimeout,
@@ -561,7 +520,6 @@
final boolean preAcknowledge,
final String loadBalancingPolicyClassName,
final int ackBatchSize,
- final long initialWaitTimeout,
final boolean useGlobalPools,
final int scheduledThreadPoolMaxSize,
final int threadPoolMaxSize,
@@ -577,9 +535,7 @@
{
assertEqualsTransportConfigurations(staticConnectors, locator.getStaticTransportConfigurations());
}
- Assert.assertEquals(locator.getDiscoveryAddress(), discoveryAddress);
- Assert.assertEquals(locator.getDiscoveryPort(), discoveryPort);
- Assert.assertEquals(locator.getDiscoveryRefreshTimeout(), discoveryRefreshTimeout);
+ Assert.assertEquals(locator.getDiscoveryGroupConfiguration(), discoveryGroupConfiguration);
Assert.assertEquals(locator.getClientFailureCheckPeriod(), clientFailureCheckPeriod);
Assert.assertEquals(locator.getConnectionTTL(), connectionTTL);
Assert.assertEquals(locator.getCallTimeout(), callTimeout);
@@ -596,7 +552,6 @@
Assert.assertEquals(locator.getConnectionLoadBalancingPolicyClassName(),
loadBalancingPolicyClassName);
Assert.assertEquals(locator.getAckBatchSize(), ackBatchSize);
- Assert.assertEquals(locator.getDiscoveryInitialWaitTimeout(), initialWaitTimeout);
Assert.assertEquals(locator.isUseGlobalPools(), useGlobalPools);
Assert.assertEquals(locator.getScheduledThreadPoolMaxSize(), scheduledThreadPoolMaxSize);
Assert.assertEquals(locator.getThreadPoolMaxSize(), threadPoolMaxSize);
@@ -624,8 +579,8 @@
BroadcastGroupConfiguration bcConfig1 = new BroadcastGroupConfiguration(bcGroupName,
null,
localBindPort,
- groupAddress,
- groupPort,
+ getUDPDiscoveryAddress(),
+ getUDPDiscoveryPort(),
broadcastPeriod,
Arrays.asList(liveTC.getName()));
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/topology/HAClientTopologyWithDiscoveryTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -15,6 +15,7 @@
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.core.logging.Logger;
/**
@@ -59,7 +60,7 @@
@Override
protected ServerLocator createHAServerLocator()
{
- ServerLocator locator = HornetQClient.createServerLocatorWithHA(groupAddress, groupPort);
+ ServerLocator locator = HornetQClient.createServerLocatorWithHA(new DiscoveryGroupConfiguration(groupAddress, groupPort));
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
return locator;
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -25,6 +25,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
import org.hornetq.jms.server.impl.JMSFactoryType;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.core.config.BroadcastGroupConfiguration;
@@ -63,8 +64,6 @@
assertFactoryParams(cf,
null,
null,
- -1,
- 0,
null,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
@@ -121,8 +120,6 @@
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
null,
- -1,
- 0,
null,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
@@ -159,12 +156,11 @@
public void testDiscoveryConstructor() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(groupAddress, groupPort, JMSFactoryType.CF);
+ DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration("test", "foo", "192.168.5.4", 3456, 5000, 1000);
+ HornetQConnectionFactory cf = (HornetQConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.CF);
assertFactoryParams(cf,
null,
- groupAddress,
- groupPort,
- 0,
+ groupConfiguration,
null,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
@@ -204,8 +200,6 @@
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
null,
- -1,
- 0,
null,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
@@ -246,8 +240,6 @@
assertFactoryParams(cf,
new TransportConfiguration[]{liveTC},
null,
- -1,
- 0,
null,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
@@ -288,7 +280,6 @@
{
HornetQConnectionFactory cf = (HornetQConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, liveTC);
- long discoveryRefreshTimeout = RandomUtil.randomPositiveLong();
long clientFailureCheckPeriod = RandomUtil.randomPositiveLong();
long connectionTTL = RandomUtil.randomPositiveLong();
long callTimeout = RandomUtil.randomPositiveLong();
@@ -303,16 +294,12 @@
boolean autoGroup = RandomUtil.randomBoolean();
boolean preAcknowledge = RandomUtil.randomBoolean();
String loadBalancingPolicyClassName = RandomUtil.randomString();
- long initialWaitTimeout = RandomUtil.randomPositiveLong();
boolean useGlobalPools = RandomUtil.randomBoolean();
int scheduledThreadPoolMaxSize = RandomUtil.randomPositiveInt();
int threadPoolMaxSize = RandomUtil.randomPositiveInt();
long retryInterval = RandomUtil.randomPositiveLong();
double retryIntervalMultiplier = RandomUtil.randomDouble();
int reconnectAttempts = RandomUtil.randomPositiveInt();
- boolean failoverOnServerShutdown = RandomUtil.randomBoolean();
-
- cf.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
cf.setClientFailureCheckPeriod(clientFailureCheckPeriod);
cf.setConnectionTTL(connectionTTL);
cf.setCallTimeout(callTimeout);
@@ -327,17 +314,12 @@
cf.setAutoGroup(autoGroup);
cf.setPreAcknowledge(preAcknowledge);
cf.setConnectionLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
- cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
cf.setUseGlobalPools(useGlobalPools);
cf.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
cf.setThreadPoolMaxSize(threadPoolMaxSize);
cf.setRetryInterval(retryInterval);
cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
cf.setReconnectAttempts(reconnectAttempts);
-
- Assert.assertEquals(null, cf.getDiscoveryAddress());
- Assert.assertEquals(-1, cf.getDiscoveryPort());
- Assert.assertEquals(discoveryRefreshTimeout, cf.getDiscoveryRefreshTimeout());
Assert.assertEquals(clientFailureCheckPeriod, cf.getClientFailureCheckPeriod());
Assert.assertEquals(connectionTTL, cf.getConnectionTTL());
Assert.assertEquals(callTimeout, cf.getCallTimeout());
@@ -352,7 +334,6 @@
Assert.assertEquals(autoGroup, cf.isAutoGroup());
Assert.assertEquals(preAcknowledge, cf.isPreAcknowledge());
Assert.assertEquals(loadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
- Assert.assertEquals(initialWaitTimeout, cf.getDiscoveryInitialWaitTimeout());
Assert.assertEquals(useGlobalPools, cf.isUseGlobalPools());
Assert.assertEquals(scheduledThreadPoolMaxSize, cf.getScheduledThreadPoolMaxSize());
Assert.assertEquals(threadPoolMaxSize, cf.getThreadPoolMaxSize());
@@ -397,15 +378,6 @@
try
{
- cf.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
- try
- {
cf.setClientID(clientID);
Assert.fail("Should throw exception");
}
@@ -559,15 +531,6 @@
}
try
{
- cf.setDiscoveryInitialWaitTimeout(initialWaitTimeout);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
- try
- {
cf.setUseGlobalPools(useGlobalPools);
Assert.fail("Should throw exception");
}
@@ -622,9 +585,6 @@
}
cf.getStaticConnectors();
- cf.getDiscoveryAddress();
- cf.getDiscoveryPort();
- cf.getDiscoveryRefreshTimeout();
cf.getClientID();
cf.getClientFailureCheckPeriod();
cf.getConnectionTTL();
@@ -642,7 +602,6 @@
cf.getConnectionLoadBalancingPolicyClassName();
cf.getDupsOKBatchSize();
cf.getTransactionBatchSize();
- cf.getDiscoveryInitialWaitTimeout();
cf.isUseGlobalPools();
cf.getScheduledThreadPoolMaxSize();
cf.getThreadPoolMaxSize();
@@ -655,9 +614,7 @@
private void assertFactoryParams(final HornetQConnectionFactory cf,
final TransportConfiguration[] staticConnectors,
- final String discoveryAddress,
- final int discoveryPort,
- final long discoveryRefreshTimeout,
+ final DiscoveryGroupConfiguration discoveryGroupConfiguration,
final String clientID,
final long clientFailureCheckPeriod,
final long connectionTTL,
@@ -697,9 +654,6 @@
Assert.assertEquals(staticConnectors[i], cfStaticConnectors[i]);
}
}
- Assert.assertEquals(cf.getDiscoveryAddress(), discoveryAddress);
- Assert.assertEquals(cf.getDiscoveryPort(), discoveryPort);
- Assert.assertEquals(cf.getDiscoveryRefreshTimeout(), discoveryRefreshTimeout);
Assert.assertEquals(cf.getClientID(), clientID);
Assert.assertEquals(cf.getClientFailureCheckPeriod(), clientFailureCheckPeriod);
Assert.assertEquals(cf.getConnectionTTL(), connectionTTL);
@@ -717,7 +671,6 @@
Assert.assertEquals(cf.getConnectionLoadBalancingPolicyClassName(), loadBalancingPolicyClassName);
Assert.assertEquals(cf.getDupsOKBatchSize(), dupsOKBatchSize);
Assert.assertEquals(cf.getTransactionBatchSize(), transactionBatchSize);
- Assert.assertEquals(cf.getDiscoveryInitialWaitTimeout(), initialWaitTimeout);
Assert.assertEquals(cf.isUseGlobalPools(), useGlobalPools);
Assert.assertEquals(cf.getScheduledThreadPoolMaxSize(), scheduledThreadPoolMaxSize);
Assert.assertEquals(cf.getThreadPoolMaxSize(), threadPoolMaxSize);
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -309,11 +309,6 @@
Assert.assertEquals(5, cf.getRetryInterval());
Assert.assertEquals(6.0, cf.getRetryIntervalMultiplier());
Assert.assertEquals(true, cf.isCacheLargeMessagesClient());
-
- assertEquals("243.7.7.7", cf.getDiscoveryAddress());
- assertEquals("172.16.8.10", cf.getLocalBindAddress());
- assertEquals(12345, cf.getDiscoveryPort());
- assertEquals(5432, cf.getDiscoveryRefreshTimeout());
}
for (String binding : queueBindings)
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-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -62,6 +62,7 @@
*
* Created 14 nov. 2008 13:35:10
*
+ *
*
*/
public class JMSServerControl2Test extends ManagementTestBase
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-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -420,6 +420,7 @@
control.createConnectionFactory(cfName,
false,
+ false,
0,
"tst",
jndiBindings);
@@ -437,7 +438,7 @@
server.getConfiguration().getConnectorConfigurations().put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
- control.createConnectionFactory(cfName, false, 0, "tst", cfJNDIBinding);
+ control.createConnectionFactory(cfName, false, false, 0, "tst", cfJNDIBinding);
control.createQueue("q", "/q");
@@ -480,7 +481,7 @@
server.getConfiguration().getConnectorConfigurations().put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
- control.createConnectionFactory(cfName, false, 0, "tst", cfJNDIBinding);
+ control.createConnectionFactory(cfName, false, false, 0, "tst", cfJNDIBinding);
control.createQueue("q", "/q");
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-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -247,38 +247,21 @@
public void createConnectionFactory(String name,
boolean ha,
+ boolean useDiscovery,
int cfType,
String[] connectorNames,
Object[] bindings) throws Exception
{
- proxy.invokeOperation("createConnectionFactory", name, ha, cfType, connectorNames, bindings);
+ proxy.invokeOperation("createConnectionFactory", name, ha, useDiscovery, cfType, connectorNames, bindings);
}
- public void createConnectionFactory(String name, boolean ha, int cfType, String connectors, String jndiBindings) throws Exception
+ public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, int cfType, String connectors, String jndiBindings) throws Exception
{
- proxy.invokeOperation("createConnectionFactory", name, ha, cfType, connectors, jndiBindings);
+ proxy.invokeOperation("createConnectionFactory", name, ha, useDiscovery, cfType, connectors, jndiBindings);
}
- public void createConnectionFactoryDiscovery(String name,
- boolean ha,
- int cfType,
- String discoveryGroupName,
- String bindings) throws Exception
- {
- proxy.invokeOperation("createConnectionFactory", name, ha, cfType, discoveryGroupName, bindings);
- }
- public void createConnectionFactoryDiscovery(String name,
- boolean ha,
- int cfType,
- String discoveryGroupName,
- Object[] bindings) throws Exception
- {
- // TODO Auto-generated method stub
-
- }
-
};
}
// Public --------------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-12-02 09:37:21 UTC (rev 9984)
+++ trunk/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-12-02 18:08:38 UTC (rev 9985)
@@ -82,10 +82,6 @@
Assert.assertEquals(factory.getConnectionTTL(), HornetQClient.DEFAULT_CONNECTION_TTL);
Assert.assertEquals(factory.getConsumerMaxRate(), HornetQClient.DEFAULT_CONSUMER_MAX_RATE);
Assert.assertEquals(factory.getConsumerWindowSize(), HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE);
- Assert.assertEquals(factory.getDiscoveryAddress(), null);
- Assert.assertEquals(factory.getDiscoveryInitialWaitTimeout(),
- HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT);
- Assert.assertEquals(factory.getDiscoveryPort(), -1);
Assert.assertEquals(factory.getDupsOKBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.getMinLargeMessageSize(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
Assert.assertEquals(factory.getProducerMaxRate(), HornetQClient.DEFAULT_PRODUCER_MAX_RATE);
@@ -132,10 +128,6 @@
Assert.assertEquals(factory.getConnectionTTL(), HornetQClient.DEFAULT_CONNECTION_TTL);
Assert.assertEquals(factory.getConsumerMaxRate(), HornetQClient.DEFAULT_CONSUMER_MAX_RATE);
Assert.assertEquals(factory.getConsumerWindowSize(), HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE);
- Assert.assertEquals(factory.getDiscoveryAddress(), null);
- Assert.assertEquals(factory.getDiscoveryInitialWaitTimeout(),
- HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT);
- Assert.assertEquals(factory.getDiscoveryPort(), -1);
Assert.assertEquals(factory.getDupsOKBatchSize(), HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.getMinLargeMessageSize(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
Assert.assertEquals(factory.getProducerMaxRate(), HornetQClient.DEFAULT_PRODUCER_MAX_RATE);
@@ -196,10 +188,6 @@
Assert.assertEquals(factory.getConnectionTTL(), 3);
Assert.assertEquals(factory.getConsumerMaxRate(), 4);
Assert.assertEquals(factory.getConsumerWindowSize(), 5);
- Assert.assertEquals(factory.getDiscoveryAddress(), null);
- Assert.assertEquals(factory.getDiscoveryInitialWaitTimeout(), 6);
- Assert.assertEquals(factory.getDiscoveryPort(), -1);
- Assert.assertEquals(factory.getDiscoveryRefreshTimeout(), 7);
Assert.assertEquals(factory.getDupsOKBatchSize(), 8);
Assert.assertEquals(factory.getMinLargeMessageSize(), 10);
Assert.assertEquals(factory.getProducerMaxRate(), 11);
@@ -257,10 +245,6 @@
Assert.assertEquals(factory.getConnectionTTL(), 3);
Assert.assertEquals(factory.getConsumerMaxRate(), 4);
Assert.assertEquals(factory.getConsumerWindowSize(), 5);
- Assert.assertEquals(factory.getDiscoveryAddress(), null);
- Assert.assertEquals(factory.getDiscoveryInitialWaitTimeout(), 6);
- Assert.assertEquals(factory.getDiscoveryPort(), -1);
- Assert.assertEquals(factory.getDiscoveryRefreshTimeout(), 7);
Assert.assertEquals(factory.getDupsOKBatchSize(), 8);
Assert.assertEquals(factory.getMinLargeMessageSize(), 10);
Assert.assertEquals(factory.getProducerMaxRate(), 11);
14 years, 1 month
JBoss hornetq SVN: r9984 - trunk/tests/src/org/hornetq/tests/util.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-12-02 04:37:21 -0500 (Thu, 02 Dec 2010)
New Revision: 9984
Modified:
trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
clear invm registry on fail
Modified: trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-02 08:46:05 UTC (rev 9983)
+++ trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-02 09:37:21 UTC (rev 9984)
@@ -773,7 +773,12 @@
deleteDirectory(new File(getTestDir()));
- Assert.assertEquals(0, InVMRegistry.instance.size());
+ int invmSize = InVMRegistry.instance.size();
+ if(invmSize > 0)
+ {
+ InVMRegistry.instance.clear();
+ fail("invm registry still had acceptors registered");
+ }
if (AsynchronousFileImpl.getTotalMaxIO() != 0)
{
14 years, 1 month
JBoss hornetq SVN: r9983 - trunk/tests/src/org/hornetq/tests/integration/management.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-12-02 03:46:05 -0500 (Thu, 02 Dec 2010)
New Revision: 9983
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
Log:
tidy up resources correctly
Modified: trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java 2010-12-02 08:45:07 UTC (rev 9982)
+++ trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java 2010-12-02 08:46:05 UTC (rev 9983)
@@ -58,6 +58,7 @@
private HornetQServer server;
protected ClientSession session;
+ private ServerLocator locator;
// Static --------------------------------------------------------
@@ -305,7 +306,7 @@
server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
server.start();
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnNonDurableSend(true);
ClientSessionFactory sf = locator.createSessionFactory();
@@ -318,6 +319,8 @@
{
session.close();
+ locator.close();
+
server.stop();
server = null;
14 years, 1 month
JBoss hornetq SVN: r9982 - trunk/tests/src/org/hornetq/tests/integration/management.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-12-02 03:45:07 -0500 (Thu, 02 Dec 2010)
New Revision: 9982
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java
Log:
tidy up resources correctly
Modified: trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java 2010-12-02 08:44:21 UTC (rev 9981)
+++ trunk/tests/src/org/hornetq/tests/integration/management/DivertControlUsingCoreTest.java 2010-12-02 08:45:07 UTC (rev 9982)
@@ -39,6 +39,7 @@
// Attributes ----------------------------------------------------
private ClientSession session;
+ private ServerLocator locator;
// Static --------------------------------------------------------
@@ -49,7 +50,6 @@
@Override
protected DivertControl createManagementControl(final String name) throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
ClientSessionFactory sf = locator.createSessionFactory();
session = sf.createSession(false, true, true);
session.start();
@@ -102,7 +102,16 @@
// Protected -----------------------------------------------------
+
@Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+ }
+
+ @Override
protected void tearDown() throws Exception
{
if (session != null)
@@ -110,6 +119,11 @@
session.close();
}
+ if(locator != null)
+ {
+ locator.close();
+ }
+
super.tearDown();
}
14 years, 1 month
JBoss hornetq SVN: r9981 - trunk/tests/src/org/hornetq/tests/integration/management.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-12-02 03:44:21 -0500 (Thu, 02 Dec 2010)
New Revision: 9981
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java
Log:
tidy up resources correctly
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java 2010-12-02 08:41:46 UTC (rev 9980)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java 2010-12-02 08:44:21 UTC (rev 9981)
@@ -41,6 +41,7 @@
// Attributes ----------------------------------------------------
private ClientSession session;
+ private ServerLocator locator;
// Static --------------------------------------------------------
@@ -51,7 +52,6 @@
@Override
protected ClusterConnectionControl createManagementControl(final String name) throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
ClientSessionFactory sf = locator.createSessionFactory();
session = sf.createSession(false, true, true);
session.start();
@@ -150,7 +150,16 @@
// Protected -----------------------------------------------------
+
@Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
+ }
+
+ @Override
protected void tearDown() throws Exception
{
if (session != null)
@@ -158,6 +167,13 @@
session.close();
}
+ if(locator != null)
+ {
+ locator.close();
+ }
+
+ locator = null;
+
session = null;
super.tearDown();
14 years, 1 month