Author: jmesnil
Date: 2010-09-06 09:26:14 -0400 (Mon, 06 Sep 2010)
New Revision: 9646
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/HornetQClient.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/ServerLocator.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/management/BridgeControl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryInternal.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/config/BridgeConfiguration.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/management/impl/BridgeControlImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/JMSServerManager.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/ConnectionFactoryConfiguration.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
branches/2_2_0_HA_Improvements/src/main/org/hornetq/ra/HornetQResourceAdapter.java
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithPagingTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/AsynchronousFailoverTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/ReSendMessageTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/JMSTestBase.java
Log:
* remove failoverOnServerShutdown property
* fix SameProcessHornetQServer.crash() to destroy the connection (and simulate a server
crash)
* in RemoteFailoverTest, run the backup server on the same VM than the tests, only the
live server
is run remote
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/HornetQClient.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/HornetQClient.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -83,8 +83,6 @@
public static final boolean DEFAULT_FAILOVER_ON_INITIAL_CONNECTION = false;
- public static final boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN = false;
-
public static final boolean DEFAULT_USE_GLOBAL_POOLS = true;
public static final int DEFAULT_THREAD_POOL_MAX_SIZE = -1;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/ServerLocator.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/client/ServerLocator.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -582,24 +582,6 @@
void setFailoverOnInitialConnection(boolean failover);
/**
- * Returns whether connections created by this factory must failover in case the
server they are
- * connected to <em>has normally shut down</em>.
- *
- * Default value is {@link HornetQClient#DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN}.
- *
- * @return <code>true</code> if connections must failover if the server
has normally shut down, else <code>false</code>
- */
- boolean isFailoverOnServerShutdown();
-
- /**
- * Sets whether connections created by this factory must failover in case the server
they are
- * connected to <em>has normally shut down</em>
- *
- * @param failoverOnServerShutdown <code>true</code> if connections must
failover if the server has normally shut down, <code>false</code> else
- */
- void setFailoverOnServerShutdown(boolean failoverOnServerShutdown);
-
- /**
* Returns the class name of the connection load balancing policy.
*
* Default value is
"org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy".
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/management/BridgeControl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/management/BridgeControl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/core/management/BridgeControl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -73,12 +73,6 @@
int getReconnectAttempts();
/**
- * Returns whether the session used by this bridge will failover if
- * the target server is normally shutdown.
- */
- boolean isFailoverOnServerShutdown();
-
- /**
* Returns whether this bridge is using duplicate detection.
*/
boolean isUseDuplicateDetection();
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -247,17 +247,7 @@
*/
void setFailoverOnInitialConnection(boolean failoverOnInitialConnection);
- /**
- * @see ClientSessionFactory#isFailoverOnServerShutdown()
- */
- boolean isFailoverOnServerShutdown();
-
/**
- * @see ClientSessionFactory#setFailoverOnServerShutdown(boolean)
- */
- void setFailoverOnServerShutdown(boolean failoverOnServerShutdown);
-
- /**
* @see org.hornetq.api.core.client.ClientSessionFactory#getDiscoveryRefreshTimeout()
*/
long getDiscoveryRefreshTimeout();
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -126,8 +126,6 @@
private final int reconnectAttempts;
- private final boolean failoverOnServerShutdown;
-
private final Set<SessionFailureListener> listeners = new
ConcurrentHashSet<SessionFailureListener>();
private Connector connector;
@@ -143,7 +141,7 @@
private volatile boolean stopPingingAfterOne;
private volatile boolean closed;
-
+
// Static
//
---------------------------------------------------------------------------------------
@@ -152,7 +150,6 @@
public ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
final TransportConfiguration connectorConfig,
- final boolean failoverOnServerShutdown,
final long callTimeout,
final long clientFailureCheckPeriod,
final long connectionTTL,
@@ -170,8 +167,6 @@
this.connectorConfig = connectorConfig;
- this.failoverOnServerShutdown = failoverOnServerShutdown;
-
connectorFactory =
instantiateConnectorFactory(connectorConfig.getFactoryClassName());
transportParams = connectorConfig.getParams();
@@ -505,7 +500,7 @@
// has been shutdown cleanly unless failoverOnServerShutdown is true
TransportConfiguration backupConfig = serverLocator.getBackup(connectorConfig);
- boolean attemptFailover = backupConfig != null &&
(failoverOnServerShutdown || !serverShutdown);
+ boolean attemptFailover = (backupConfig != null) && !serverShutdown;
boolean attemptReconnect;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryInternal.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryInternal.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryInternal.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -36,5 +36,4 @@
int numSessions();
void removeSession(final ClientSessionInternal session, boolean failingOver);
-
}
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -153,8 +153,6 @@
private volatile boolean closed;
- private boolean failoverOnServerShutdown;
-
private final List<Interceptor> interceptors = new
CopyOnWriteArrayList<Interceptor>();
private static ExecutorService globalThreadPool;
@@ -376,8 +374,6 @@
failoverOnInitialConnection =
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION;
- failoverOnServerShutdown = HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
-
cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
initialMessagePacketSize = HornetQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
@@ -494,7 +490,6 @@
ClientSessionFactory factory = new ClientSessionFactoryImpl(this,
transportConfiguration,
- failoverOnServerShutdown,
callTimeout,
clientFailureCheckPeriod,
connectionTTL,
@@ -560,7 +555,6 @@
{
factory = new ClientSessionFactoryImpl(this,
tc,
- failoverOnServerShutdown,
callTimeout,
clientFailureCheckPeriod,
connectionTTL,
@@ -923,17 +917,6 @@
this.failoverOnInitialConnection = failover;
}
- public synchronized boolean isFailoverOnServerShutdown()
- {
- return failoverOnServerShutdown;
- }
-
- public synchronized void setFailoverOnServerShutdown(final boolean
failoverOnServerShutdown)
- {
- checkWrite();
- this.failoverOnServerShutdown = failoverOnServerShutdown;
- }
-
public synchronized String getConnectionLoadBalancingPolicyClassName()
{
return connectionLoadBalancingPolicyClassName;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/config/BridgeConfiguration.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/config/BridgeConfiguration.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/config/BridgeConfiguration.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -51,8 +51,6 @@
private int reconnectAttempts;
- private boolean failoverOnServerShutdown;
-
private boolean useDuplicateDetection;
private int confirmationWindowSize;
@@ -71,7 +69,6 @@
final long retryInterval,
final double retryIntervalMultiplier,
final int reconnectAttempts,
- final boolean failoverOnServerShutdown,
final boolean useDuplicateDetection,
final int confirmationWindowSize,
final long clientFailureCheckPeriod,
@@ -88,7 +85,6 @@
this.retryInterval = retryInterval;
this.retryIntervalMultiplier = retryIntervalMultiplier;
this.reconnectAttempts = reconnectAttempts;
- this.failoverOnServerShutdown = failoverOnServerShutdown;
this.useDuplicateDetection = useDuplicateDetection;
this.confirmationWindowSize = confirmationWindowSize;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
@@ -106,7 +102,6 @@
final long retryInterval,
final double retryIntervalMultiplier,
final int reconnectAttempts,
- final boolean failoverOnServerShutdown,
final boolean useDuplicateDetection,
final int confirmationWindowSize,
final long clientFailureCheckPeriod,
@@ -123,7 +118,6 @@
this.retryInterval = retryInterval;
this.retryIntervalMultiplier = retryIntervalMultiplier;
this.reconnectAttempts = reconnectAttempts;
- this.failoverOnServerShutdown = failoverOnServerShutdown;
this.useDuplicateDetection = useDuplicateDetection;
this.confirmationWindowSize = confirmationWindowSize;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
@@ -189,11 +183,6 @@
return reconnectAttempts;
}
- public boolean isFailoverOnServerShutdown()
- {
- return failoverOnServerShutdown;
- }
-
public boolean isUseDuplicateDetection()
{
return useDuplicateDetection;
@@ -299,14 +288,6 @@
}
/**
- * @param failoverOnServerShutdown the failoverOnServerShutdown to set
- */
- public void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
- {
- this.failoverOnServerShutdown = failoverOnServerShutdown;
- }
-
- /**
* @param useDuplicateDetection the useDuplicateDetection to set
*/
public void setUseDuplicateDetection(final boolean useDuplicateDetection)
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -1061,10 +1061,6 @@
ConfigurationImpl.DEFAULT_BRIDGE_RECONNECT_ATTEMPTS,
Validators.MINUS_ONE_OR_GE_ZERO);
- boolean failoverOnServerShutdown = XMLConfigurationUtil.getBoolean(brNode,
-
"failover-on-server-shutdown",
-
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
-
boolean useDuplicateDetection = XMLConfigurationUtil.getBoolean(brNode,
"use-duplicate-detection",
ConfigurationImpl.DEFAULT_BRIDGE_DUPLICATE_DETECTION);
@@ -1119,7 +1115,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- failoverOnServerShutdown,
useDuplicateDetection,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -1138,7 +1133,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- failoverOnServerShutdown,
useDuplicateDetection,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/management/impl/BridgeControlImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/management/impl/BridgeControlImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/management/impl/BridgeControlImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -131,19 +131,6 @@
}
}
- public boolean isFailoverOnServerShutdown()
- {
- clearIO();
- try
- {
- return configuration.isFailoverOnServerShutdown();
- }
- finally
- {
- blockOnIO();
- }
- }
-
public String getName()
{
clearIO();
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -608,7 +608,6 @@
}
serverLocator.setConfirmationWindowSize(config.getConfirmationWindowSize());
- serverLocator.setFailoverOnServerShutdown(config.isFailoverOnServerShutdown());
serverLocator.setReconnectAttempts(config.getReconnectAttempts());
serverLocator.setRetryInterval(config.getRetryInterval());
serverLocator.setRetryIntervalMultiplier(config.getRetryIntervalMultiplier());
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -500,17 +500,6 @@
serverLocator.setFailoverOnInitialConnection(failover);
}
- public synchronized boolean isFailoverOnServerShutdown()
- {
- return serverLocator.isFailoverOnServerShutdown();
- }
-
- public synchronized void setFailoverOnServerShutdown(final boolean
failoverOnServerShutdown)
- {
- checkWrite();
- serverLocator.setFailoverOnServerShutdown(failoverOnServerShutdown);
- }
-
public synchronized boolean isUseGlobalPools()
{
return serverLocator.isUseGlobalPools();
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -220,11 +220,6 @@
cf.setFailoverOnInitialConnection(failover);
}
- public void setFailoverOnServerShutdown(boolean failoverOnServerShutdown)
- {
- cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
- }
-
public boolean isUseGlobalPools()
{
return cf.isUseGlobalPools();
@@ -390,11 +385,6 @@
return cf.isFailoverOnInitialConnection();
}
- public boolean isFailoverOnServerShutdown()
- {
- return cf.isFailoverOnServerShutdown();
- }
-
public int getMinLargeMessageSize()
{
return cf.getMinLargeMessageSize();
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/JMSServerManager.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/JMSServerManager.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/JMSServerManager.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -194,7 +194,6 @@
long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnInitialConnection,
- boolean failoverOnServerShutdown,
String groupId,
String ... jndiBindings) throws Exception;
@@ -232,7 +231,6 @@
long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnInitialConnection,
- boolean failoverOnServerShutdown,
String groupId,
String ... jndiBindings) throws Exception;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/ConnectionFactoryConfiguration.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/ConnectionFactoryConfiguration.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/ConnectionFactoryConfiguration.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -165,10 +165,6 @@
void setReconnectAttempts(int reconnectAttempts);
- boolean isFailoverOnServerShutdown();
-
- void setFailoverOnServerShutdown(boolean failoverOnServerShutdown);
-
boolean isFailoverOnInitialConnection();
void setFailoverOnInitialConnection(boolean failover);
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -108,8 +108,6 @@
private boolean failoverOnInitialConnection =
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION;
- private boolean failoverOnServerShutdown =
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
-
private String groupID = null;
// Static --------------------------------------------------------
@@ -506,16 +504,6 @@
this.failoverOnInitialConnection = failover;
}
- public boolean isFailoverOnServerShutdown()
- {
- return failoverOnServerShutdown;
- }
-
- public void setFailoverOnServerShutdown(final boolean failoverOnServerShutdown)
- {
- this.failoverOnServerShutdown = failoverOnServerShutdown;
- }
-
public String getGroupID()
{
return groupID;
@@ -615,8 +603,6 @@
failoverOnInitialConnection = buffer.readBoolean();
- failoverOnServerShutdown = buffer.readBoolean();
-
groupID = BufferHelper.readNullableSimpleStringAsString(buffer);
}
@@ -705,8 +691,6 @@
buffer.writeBoolean(failoverOnInitialConnection);
- buffer.writeBoolean(failoverOnServerShutdown);
-
BufferHelper.writeAsNullableSimpleString(buffer, groupID);
}
@@ -815,9 +799,6 @@
DataConstants.SIZE_BOOLEAN +
// failoverOnInitialConnection
- DataConstants.SIZE_BOOLEAN +
- // failoverOnServerShutdown
-
BufferHelper.sizeOfNullableSimpleString(groupID);
return size;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -322,9 +322,6 @@
"failover-on-initial-connection",
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION);
- boolean failoverOnServerShutdown = XMLConfigurationUtil.getBoolean(e,
-
"failover-on-server-shutdown",
-
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
boolean useGlobalPools = XMLConfigurationUtil.getBoolean(e,
"use-global-pools",
HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
@@ -465,7 +462,6 @@
cfConfig.setRetryIntervalMultiplier(retryIntervalMultiplier);
cfConfig.setMaxRetryInterval(maxRetryInterval);
cfConfig.setReconnectAttempts(reconnectAttempts);
- cfConfig.setFailoverOnServerShutdown(failoverOnServerShutdown);
cfConfig.setFailoverOnInitialConnection(failoverOnInitialConnection);
cfConfig.setGroupID(groupid);
return cfConfig;
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -719,7 +719,6 @@
final long maxRetryInterval,
final int reconnectAttempts,
final boolean
failoverOnInitialConnection,
- final boolean
failoverOnServerShutdown,
final String groupId,
String... jndiBindings) throws
Exception
{
@@ -757,7 +756,6 @@
configuration.setMaxRetryInterval(maxRetryInterval);
configuration.setReconnectAttempts(reconnectAttempts);
configuration.setFailoverOnInitialConnection(failoverOnInitialConnection);
- configuration.setFailoverOnServerShutdown(failoverOnServerShutdown);
configuration.setGroupID(groupId);
createConnectionFactory(true, configuration, jndiBindings);
}
@@ -797,7 +795,6 @@
final long maxRetryInterval,
final int reconnectAttempts,
final boolean
failoverOnInitialConnection,
- final boolean
failoverOnServerShutdown,
final String groupId,
final String... jndiBindings) throws
Exception
{
@@ -839,7 +836,6 @@
configuration.setMaxRetryInterval(maxRetryInterval);
configuration.setReconnectAttempts(reconnectAttempts);
configuration.setFailoverOnInitialConnection(failoverOnInitialConnection);
- configuration.setFailoverOnServerShutdown(failoverOnServerShutdown);
createConnectionFactory(true, configuration, jndiBindings);
}
}
@@ -1042,7 +1038,6 @@
cf.setMaxRetryInterval(cfConfig.getMaxRetryInterval());
cf.setReconnectAttempts(cfConfig.getReconnectAttempts());
cf.setFailoverOnInitialConnection(cfConfig.isFailoverOnInitialConnection());
- cf.setFailoverOnServerShutdown(cfConfig.isFailoverOnServerShutdown());
}
connectionFactories.put(cfConfig.getName(), cf);
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/ra/HornetQResourceAdapter.java
===================================================================
---
branches/2_2_0_HA_Improvements/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/ra/HornetQResourceAdapter.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -1420,12 +1420,6 @@
{
cf.setBlockOnDurableSend(val);
}
- val = overrideProperties.isFailoverOnServerShutdown() != null ?
overrideProperties.isFailoverOnServerShutdown()
- :
raProperties.isFailoverOnServerShutdown();
- if (val != null)
- {
- cf.setFailoverOnServerShutdown(val);
- }
val = overrideProperties.isPreAcknowledge() != null ?
overrideProperties.isPreAcknowledge()
:
raProperties.isPreAcknowledge();
if (val != null)
Modified:
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -91,7 +91,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
-
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
null,
"/StrictTCKConnectionFactory");
Modified:
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -88,7 +88,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
-
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
null,
"/testsuitecf");
Modified:
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -318,7 +318,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
-
HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
null,
jndiBindings);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -141,8 +141,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
ClientSessionFactory cf = locator.createSessionFactory();
ClientSession session = cf.createSession(false, true, true);
@@ -184,8 +183,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
ClientSessionFactory cf = locator.createSessionFactory();
ClientSession session = cf.createSession(false, true, true);
@@ -225,7 +223,6 @@
long retryInterval = RandomUtil.randomPositiveLong();
double retryIntervalMultiplier = RandomUtil.randomDouble();
int reconnectAttempts = RandomUtil.randomPositiveInt();
- boolean failoverOnServerShutdown = RandomUtil.randomBoolean();
locator.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
locator.setClientFailureCheckPeriod(clientFailureCheckPeriod);
@@ -250,7 +247,6 @@
locator.setRetryInterval(retryInterval);
locator.setRetryIntervalMultiplier(retryIntervalMultiplier);
locator.setReconnectAttempts(reconnectAttempts);
- locator.setFailoverOnServerShutdown(failoverOnServerShutdown);
assertEqualsTransportConfigurations(tc,
locator.getStaticTransportConfigurations());
Assert.assertEquals(null, locator.getDiscoveryAddress());
@@ -279,7 +275,6 @@
Assert.assertEquals(retryInterval, locator.getRetryInterval());
Assert.assertEquals(retryIntervalMultiplier,
locator.getRetryIntervalMultiplier());
Assert.assertEquals(reconnectAttempts, locator.getReconnectAttempts());
- Assert.assertEquals(failoverOnServerShutdown,
locator.isFailoverOnServerShutdown());
}
@@ -308,7 +303,6 @@
long retryInterval = RandomUtil.randomPositiveLong();
double retryIntervalMultiplier = RandomUtil.randomDouble();
int reconnectAttempts = RandomUtil.randomPositiveInt();
- boolean failoverOnServerShutdown = RandomUtil.randomBoolean();
try
{
@@ -517,15 +511,6 @@
{
// OK
}
- try
- {
- cf.getServerLocator().setFailoverOnServerShutdown(failoverOnServerShutdown);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
cf.getServerLocator().getStaticTransportConfigurations();
cf.getServerLocator().getDiscoveryAddress();
@@ -553,7 +538,6 @@
cf.getServerLocator().getRetryInterval();
cf.getServerLocator().getRetryIntervalMultiplier();
cf.getServerLocator().getReconnectAttempts();
- cf.getServerLocator().isFailoverOnServerShutdown();
}
@@ -583,8 +567,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
- final int reconnectAttempts,
- final boolean failoverOnServerShutdown)
+ final int reconnectAttempts)
{
if (staticConnectors == null)
{
@@ -620,7 +603,6 @@
Assert.assertEquals(locator.getRetryInterval(), retryInterval);
Assert.assertEquals(locator.getRetryIntervalMultiplier(),
retryIntervalMultiplier);
Assert.assertEquals(locator.getReconnectAttempts(), reconnectAttempts);
- Assert.assertEquals(locator.isFailoverOnServerShutdown(),
failoverOnServerShutdown);
}
private void startServer() throws Exception
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -118,7 +118,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -245,7 +244,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -367,7 +365,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -498,7 +495,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
clientFailureCheckPeriod,
@@ -622,7 +618,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -106,7 +106,6 @@
1d,
0,
true,
- true,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
staticConnectors,
@@ -261,7 +260,6 @@
1d,
-1,
true,
- true,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
staticConnectors,
@@ -464,7 +462,6 @@
1d,
0,
false,
- false,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
staticConnectors,
@@ -604,7 +601,6 @@
1000,
1d,
1,
- false,
true,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -127,7 +127,6 @@
1000,
1d,
-1,
- true,
false,
// Choose
confirmation size to make sure acks
// are sent
@@ -324,7 +323,6 @@
1000,
1d,
-1,
- true,
false,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -496,7 +494,6 @@
1000,
1d,
-1,
- true,
false,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -628,7 +625,6 @@
1000,
1d,
-1,
- true,
false,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -766,7 +762,6 @@
1000,
1d,
-1,
- true,
false,
// Choose
confirmation size to make sure acks
// are sent
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -113,7 +113,6 @@
1d,
0,
true,
- true,
1024,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
staticConnectors,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithPagingTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithPagingTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithPagingTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -116,7 +116,6 @@
retryInterval,
retryIntervalMultiplier,
reconnectAttempts,
- true,
false,
confirmationWindowSize,
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -1157,7 +1157,6 @@
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(serverTotc);
- locator.setFailoverOnServerShutdown(false);
locator.setRetryInterval(100);
locator.setRetryIntervalMultiplier(1d);
locator.setReconnectAttempts(-1);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusteredGroupingTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -757,7 +757,12 @@
stopServers(1);
+ closeSessionFactory(1);
+
startServers(1);
+
+ setupSessionFactory(1, isNetty());
+
Assert.assertTrue("timed out waiting for bindings to be removed and added
back", latch.await(5,
TimeUnit.SECONDS));
getServer(0).getManagementService().removeNotificationListener(listener);
@@ -855,9 +860,11 @@
getServer(2).getManagementService().addNotificationListener(listener);
stopServers(1);
+ closeSessionFactory(1);
startServers(1);
Assert.assertTrue("timed out waiting for bindings to be removed and added
back", latch.await(5,
TimeUnit.SECONDS));
+ setupSessionFactory(1, isNetty());
getServer(0).getManagementService().removeNotificationListener(listener);
getServer(2).getManagementService().removeNotificationListener(listener);
addConsumer(1, 1, "queue0", null);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/AsynchronousFailoverTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/AsynchronousFailoverTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/AsynchronousFailoverTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -170,7 +170,6 @@
ServerLocator locator = getServerLocator();
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
sf = (ClientSessionFactoryInternal)
createSessionFactoryAndWaitForTopology(locator, 2);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -84,7 +84,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
sf = createSessionFactoryAndWaitForTopology(locator, 2);
@@ -147,7 +146,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -236,7 +234,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -306,7 +303,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
locator.setFailoverOnInitialConnection(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -365,7 +361,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -431,7 +426,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -505,7 +499,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -580,7 +573,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -663,7 +655,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -740,7 +731,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -829,7 +819,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -893,7 +882,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -960,7 +948,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1028,7 +1015,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1111,7 +1097,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1190,7 +1175,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1272,7 +1256,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1384,7 +1367,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1485,7 +1467,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1558,7 +1539,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1635,7 +1615,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
locator.setBlockOnAcknowledge(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1741,7 +1720,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
locator.setBlockOnAcknowledge(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
@@ -1806,7 +1784,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
locator.setBlockOnAcknowledge(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
@@ -1873,7 +1850,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
locator.setBlockOnAcknowledge(true);
@@ -2028,7 +2004,6 @@
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
locator.setBlockOnAcknowledge(true);
- locator.setFailoverOnServerShutdown(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator,
2);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -14,19 +14,17 @@
package org.hornetq.tests.integration.cluster.failover;
import java.util.ArrayList;
-import java.util.List;
import java.util.Map;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
import org.hornetq.tests.integration.cluster.util.RemoteProcessHornetQServer;
-import org.hornetq.tests.integration.cluster.util.RemoteProcessHornetQServerSupport;
import org.hornetq.tests.integration.cluster.util.RemoteServerConfiguration;
+import org.hornetq.tests.integration.cluster.util.SameProcessHornetQServer;
import org.hornetq.tests.integration.cluster.util.TestableServer;
/**
@@ -71,38 +69,6 @@
}
- public static class SharedBackupServerConfiguration extends RemoteServerConfiguration
- {
-
- @Override
- public Configuration getConfiguration()
- {
- Configuration config = createDefaultConfig(generateParams(1, true),
NettyAcceptorFactory.class.getName());
- config.setJournalType(JournalType.NIO);
- config.setSharedStore(true);
- config.setBackup(true);
- config.setClustered(true);
- config.setLiveConnectorName("live");
- config.getConnectorConfigurations().put("live",
- createTransportConfiguration(true,
false, generateParams(0, true)));
- config.getConnectorConfigurations().put("self",
- createTransportConfiguration(true,
false, generateParams(1, true)));
- List<String> connectors = new ArrayList<String>();
- connectors.add("live");
- config.getClusterConfigurations().add(new
ClusterConnectionConfiguration("cluster",
-
"foo",
-
"self",
- -1,
- false,
- false,
- 1,
- 1,
-
connectors));
- return config;
- }
-
- }
-
@Override
protected TestableServer createLiveServer()
{
@@ -112,7 +78,7 @@
@Override
protected TestableServer createBackupServer()
{
- return new
RemoteProcessHornetQServer(SharedBackupServerConfiguration.class.getName());
+ return new
SameProcessHornetQServer(HornetQServers.newHornetQServer(backupConfig));
}
protected TransportConfiguration getConnectorTransportConfiguration(final boolean
live) {
@@ -126,6 +92,20 @@
}
return createTransportConfiguration(true, false, params);
}
+
+ @Override
+ protected TransportConfiguration getAcceptorTransportConfiguration(boolean live)
+ {
+ Map<String, Object> params = null;
+ if (live)
+ {
+ params = generateParams(0, true);
+ } else
+ {
+ params = generateParams(1, true);
+ }
+ return createTransportConfiguration(true, true, params);
+ }
// Constructors --------------------------------------------------
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -14,6 +14,7 @@
package org.hornetq.tests.integration.cluster.util;
import java.io.File;
+import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -22,8 +23,11 @@
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.SessionFailureListener;
+import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
+import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.cluster.impl.FakeLockFile;
+import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.util.ServiceTestBase;
/**
@@ -77,13 +81,21 @@
{
session.addFailureListener(new MyListener());
}
+ Set<RemotingConnection> connections =
server.getRemotingService().getConnections();
+ for (RemotingConnection remotingConnection : connections)
+ {
+ remotingConnection.destroy();
+ server.getRemotingService().removeConnection(remotingConnection.getID());
+ }
server.stop();
+
// recreate the live.lock file (since it was deleted by the
// clean stop
File lockFile = new File(ServiceTestBase.getJournalDir(), "live.lock");
Assert.assertFalse(lockFile.exists());
lockFile.createNewFile();
-
+
+
// Wait to be informed of failure
boolean ok = latch.await(10000, TimeUnit.MILLISECONDS);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -157,7 +157,6 @@
1000,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
"/cf");
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -87,8 +87,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
Connection conn = null;
try
@@ -146,8 +145,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
Connection conn = cf.createConnection();
@@ -189,8 +187,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
Connection conn = cf.createConnection();
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -231,8 +228,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
Connection conn = cf.createConnection();
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -274,8 +270,7 @@
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
HornetQClient.DEFAULT_RETRY_INTERVAL,
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- HornetQClient.DEFAULT_RECONNECT_ATTEMPTS,
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
+ HornetQClient.DEFAULT_RECONNECT_ATTEMPTS);
Connection conn = cf.createConnection();
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -335,7 +330,6 @@
cf.setRetryInterval(retryInterval);
cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
cf.setReconnectAttempts(reconnectAttempts);
- cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
Assert.assertEquals(null, cf.getDiscoveryAddress());
Assert.assertEquals(-1, cf.getDiscoveryPort());
@@ -361,7 +355,6 @@
Assert.assertEquals(retryInterval, cf.getRetryInterval());
Assert.assertEquals(retryIntervalMultiplier, cf.getRetryIntervalMultiplier());
Assert.assertEquals(reconnectAttempts, cf.getReconnectAttempts());
- Assert.assertEquals(failoverOnServerShutdown, cf.isFailoverOnServerShutdown());
cf.close();
}
@@ -623,15 +616,6 @@
{
// OK
}
- try
- {
- cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
- Assert.fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- // OK
- }
cf.getStaticConnectors();
cf.getDiscoveryAddress();
@@ -661,8 +645,6 @@
cf.getRetryInterval();
cf.getRetryIntervalMultiplier();
cf.getReconnectAttempts();
- cf.isFailoverOnServerShutdown();
-
}
private void assertFactoryParams(final HornetQConnectionFactory cf,
@@ -693,8 +675,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
- final int reconnectAttempts,
- final boolean failoverOnServerShutdown)
+ final int reconnectAttempts)
{
TransportConfiguration[] cfStaticConnectors = cf.getStaticConnectors();
if (staticConnectors == null)
@@ -737,7 +718,6 @@
Assert.assertEquals(cf.getRetryInterval(), retryInterval);
Assert.assertEquals(cf.getRetryIntervalMultiplier(), retryIntervalMultiplier);
Assert.assertEquals(cf.getReconnectAttempts(), reconnectAttempts);
- Assert.assertEquals(cf.isFailoverOnServerShutdown(), failoverOnServerShutdown);
}
@Override
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -176,7 +176,6 @@
cfConfig.setRetryInterval(1000);
cfConfig.setRetryIntervalMultiplier(1.0);
cfConfig.setReconnectAttempts(-1);
- cfConfig.setFailoverOnServerShutdown(true);
configuration.getConnectionFactoryConfigurations().add(cfConfig);
serverManager = new JMSServerManagerImpl(server, configuration);
serverManager.start();
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -195,7 +195,6 @@
int retryInterval = 1000;
double retryIntervalMultiplier = 1.0;
int reconnectAttempts = -1;
- boolean failoverOnServerShutdown = true;
int callTimeout = 30000;
jmsServer.createConnectionFactory("ManualReconnectionToSingleServerTest",
@@ -228,7 +227,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
jndiBindings);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/ReSendMessageTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/ReSendMessageTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/ReSendMessageTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -294,7 +294,6 @@
int retryInterval = 1000;
double retryIntervalMultiplier = 1.0;
int reconnectAttempts = -1;
- boolean failoverOnServerShutdown = true;
int callTimeout = 30000;
jmsServer.createConnectionFactory("ManualReconnectionToSingleServerTest",
@@ -327,7 +326,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
jndiBindings);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -95,7 +95,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
0,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- false,
null,
"/cffoo");
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -230,7 +230,6 @@
int retryInterval = 1000;
double retryIntervalMultiplier = 1.0;
int reconnectAttempts = -1;
- boolean failoverOnServerShutdown = true;
int callTimeout = 30000;
jmsServer.createConnectionFactory("ManualReconnectionToSingleServerTest",
@@ -263,7 +262,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
jndiBindings);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/divert/DivertAndACKClientTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -141,7 +141,6 @@
int retryInterval = 1000;
double retryIntervalMultiplier = 1.0;
int reconnectAttempts = -1;
- boolean failoverOnServerShutdown = true;
int callTimeout = 30000;
jmsServer.createConnectionFactory("ManualReconnectionToSingleServerTest",
@@ -174,7 +173,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
jndiBindings);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -219,7 +219,6 @@
Assert.assertEquals(false, cf.isAutoGroup());
Assert.assertEquals(true, cf.isPreAcknowledge());
Assert.assertEquals(2345, cf.getConnectionTTL());
- Assert.assertEquals(false, cf.isFailoverOnServerShutdown());
assertEquals(true, cf.isFailoverOnInitialConnection());
Assert.assertEquals(34, cf.getReconnectAttempts());
Assert.assertEquals(5, cf.getRetryInterval());
@@ -306,7 +305,6 @@
Assert.assertEquals(true, cf.isPreAcknowledge());
Assert.assertEquals(2345, cf.getConnectionTTL());
assertEquals(true, cf.isFailoverOnInitialConnection());
- Assert.assertEquals(false, cf.isFailoverOnServerShutdown());
Assert.assertEquals(34, cf.getReconnectAttempts());
Assert.assertEquals(5, cf.getRetryInterval());
Assert.assertEquals(6.0, cf.getRetryIntervalMultiplier());
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -83,7 +83,6 @@
assertEquals(false, cfConfig.isAutoGroup());
assertEquals(true, cfConfig.isPreAcknowledge());
assertEquals(2345, cfConfig.getConnectionTTL());
- assertEquals(false, cfConfig.isFailoverOnServerShutdown());
assertEquals("FooClass", cfConfig.getLoadBalancingPolicyClassName());
assertEquals(34, cfConfig.getReconnectAttempts());
assertEquals(5, cfConfig.getRetryInterval());
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -81,7 +81,6 @@
Assert.assertEquals(bridgeConfig.getRetryInterval(),
bridgeControl.getRetryInterval());
Assert.assertEquals(bridgeConfig.getRetryIntervalMultiplier(),
bridgeControl.getRetryIntervalMultiplier());
Assert.assertEquals(bridgeConfig.getReconnectAttempts(),
bridgeControl.getReconnectAttempts());
- Assert.assertEquals(bridgeConfig.isFailoverOnServerShutdown(),
bridgeControl.isFailoverOnServerShutdown());
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(),
bridgeControl.isUseDuplicateDetection());
String[] connectorPairData = bridgeControl.getStaticConnectors();
@@ -171,7 +170,6 @@
RandomUtil.randomDouble(),
RandomUtil.randomPositiveInt(),
RandomUtil.randomBoolean(),
- RandomUtil.randomBoolean(),
RandomUtil.randomPositiveInt(),
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
connectors,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -86,8 +86,6 @@
proxy.retrieveAttributeValue("retryIntervalMultiplier"));
Assert.assertEquals(bridgeConfig.getReconnectAttempts(),
((Integer)proxy.retrieveAttributeValue("reconnectAttempts")).intValue());
- Assert.assertEquals(bridgeConfig.isFailoverOnServerShutdown(),
-
((Boolean)proxy.retrieveAttributeValue("failoverOnServerShutdown")).booleanValue());
Assert.assertEquals(bridgeConfig.isUseDuplicateDetection(),
((Boolean)proxy.retrieveAttributeValue("useDuplicateDetection")).booleanValue());
@@ -149,7 +147,6 @@
RandomUtil.randomDouble(),
RandomUtil.randomPositiveInt(),
RandomUtil.randomBoolean(),
- RandomUtil.randomBoolean(),
RandomUtil.randomPositiveInt(),
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
connectors,
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -204,7 +204,6 @@
Assert.assertEquals(3, bc.getRetryInterval());
Assert.assertEquals(0.2, bc.getRetryIntervalMultiplier());
Assert.assertEquals(2, bc.getReconnectAttempts());
- Assert.assertEquals(false, bc.isFailoverOnServerShutdown());
Assert.assertEquals(true, bc.isUseDuplicateDetection());
Assert.assertEquals("connector1",
bc.getStaticConnectors().get(0));
Assert.assertEquals(null, bc.getDiscoveryGroupName());
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -107,8 +107,6 @@
Assert.assertEquals(factory.isBlockOnNonDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
- Assert.assertEquals(factory.isFailoverOnServerShutdown(),
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
Assert.assertEquals(factory.isPreAcknowledge(),
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
}
@@ -161,8 +159,6 @@
Assert.assertEquals(factory.isBlockOnNonDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
- Assert.assertEquals(factory.isFailoverOnServerShutdown(),
- HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
Assert.assertEquals(factory.isPreAcknowledge(),
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
}
@@ -185,7 +181,6 @@
ra.setDiscoveryInitialWaitTimeout(6l);
ra.setDiscoveryRefreshTimeout(7l);
ra.setDupsOKBatchSize(8);
-
ra.setFailoverOnServerShutdown(!HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
ra.setMinLargeMessageSize(10);
ra.setPreAcknowledge(!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
ra.setProducerMaxRate(11);
@@ -224,8 +219,6 @@
Assert.assertEquals(factory.isBlockOnNonDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
- Assert.assertEquals(factory.isFailoverOnServerShutdown(),
- !HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
Assert.assertEquals(factory.isPreAcknowledge(),
!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
!HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
}
@@ -249,7 +242,6 @@
connectionFactoryProperties.setDiscoveryInitialWaitTimeout(6l);
connectionFactoryProperties.setDiscoveryRefreshTimeout(7l);
connectionFactoryProperties.setDupsOKBatchSize(8);
-
connectionFactoryProperties.setFailoverOnServerShutdown(!HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
connectionFactoryProperties.setMinLargeMessageSize(10);
connectionFactoryProperties.setPreAcknowledge(!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
connectionFactoryProperties.setProducerMaxRate(11);
@@ -288,8 +280,6 @@
Assert.assertEquals(factory.isBlockOnNonDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
- Assert.assertEquals(factory.isFailoverOnServerShutdown(),
- !HornetQClient.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
Assert.assertEquals(factory.isPreAcknowledge(),
!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
!HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/JMSTestBase.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/JMSTestBase.java 2010-09-06
09:17:35 UTC (rev 9645)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/util/JMSTestBase.java 2010-09-06
13:26:14 UTC (rev 9646)
@@ -211,7 +211,6 @@
HornetQClient.DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION,
- failoverOnServerShutdown,
null,
jndiBindings);
}