Author: clebert.suconic(a)jboss.com
Date: 2011-07-06 15:19:41 -0400 (Wed, 06 Jul 2011)
New Revision: 10936
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnector.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
Log:
Fixing a few tests
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-06
15:50:53 UTC (rev 10935)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-06
19:19:41 UTC (rev 10936)
@@ -945,7 +945,10 @@
private void getConnectionWithRetry(final int reconnectAttempts)
{
- log.info("getConnectionWithRetry::" + reconnectAttempts);
+ if (log.isTraceEnabled())
+ {
+ log.trace("getConnectionWithRetry::" + reconnectAttempts + " with
retryInterval = " + retryInterval + " multiplier = " +
retryIntervalMultiplier, new Exception ("trace"));
+ }
long interval = retryInterval;
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnector.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnector.java 2011-07-06
15:50:53 UTC (rev 10935)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/remoting/impl/invm/InVMConnector.java 2011-07-06
19:19:41 UTC (rev 10936)
@@ -128,6 +128,8 @@
if (InVMConnector.failOnCreateConnection)
{
InVMConnector.incFailures();
+
+ log.debug("Returning null on InVMConnector for tests");
// For testing only
return null;
}
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-07-06
15:50:53 UTC (rev 10935)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-07-06
19:19:41 UTC (rev 10936)
@@ -518,8 +518,9 @@
public final void connectionFailed(final HornetQException me, boolean failedOver)
{
- log.warn(this + "::Connection failed with failedOver=" + failedOver +
"-" + me, new Exception (me.getMessage()));
+ log.warn(this + "::Connection failed with failedOver=" + failedOver +
"-" + me, me);
+
try
{
// csf.cleanup();
@@ -538,12 +539,10 @@
if (me.getCode() == HornetQException.DISCONNECTED)
{
- log.warn(this + "::Connection failed with failedOver=" + failedOver +
"-" + me, me);
fail(true);
}
else
{
- log.warn(this + "::Connection failed with failedOver=" + failedOver +
"-" + me, me);
fail(false);
scheduleRetryConnect();
}
@@ -612,7 +611,7 @@
/* This is called only when the bridge is activated */
protected void connect()
{
- BridgeImpl.log.info("Connecting " + this + " to its destination
[" + nodeUUID.toString() + "], csf=" + this.csf);
+ BridgeImpl.log.debug("Connecting " + this + " to its destination
[" + nodeUUID.toString() + "], csf=" + this.csf);
retryCount++;
@@ -763,7 +762,7 @@
if (log.isDebugEnabled())
{
- log.debug("Scheduling retry for bridge " + this.name + "in "
+ milliseconds + " milliseconds");
+ log.debug("Scheduling retry for bridge " + this.name + " in
" + milliseconds + " milliseconds");
}
futureScheduledReconnection = scheduledExecutor.schedule(new
FutureConnectRunnable(), milliseconds, TimeUnit.MILLISECONDS);
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-06
15:50:53 UTC (rev 10935)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-07-06
19:19:41 UTC (rev 10936)
@@ -627,6 +627,10 @@
targetLocator.setBlockOnNonDurableSend(!useDuplicateDetection);
targetLocator.setClusterConnection(true);
+ targetLocator.setRetryInterval(retryInterval);
+ targetLocator.setMaxRetryInterval(maxRetryInterval);
+ targetLocator.setRetryIntervalMultiplier(retryIntervalMultiplier);
+
targetLocator.setNodeID(serverLocator.getNodeID());
targetLocator.setClusterTransportConfiguration(serverLocator.getClusterTransportConfiguration());
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-07-06
15:50:53 UTC (rev 10935)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-07-06
19:19:41 UTC (rev 10936)
@@ -682,9 +682,9 @@
// We are going to manually retry on the bridge in case of failure
serverLocator.setReconnectAttempts(0);
serverLocator.setInitialConnectAttempts(-1);
-
-
-
+ serverLocator.setRetryInterval(config.getRetryInterval());
+ serverLocator.setMaxRetryInterval(config.getMaxRetryInterval());
+ serverLocator.setRetryIntervalMultiplier(config.getRetryIntervalMultiplier());
serverLocator.setClientFailureCheckPeriod(config.getClientFailureCheckPeriod());
serverLocator.setBlockOnDurableSend(!config.isUseDuplicateDetection());
serverLocator.setBlockOnNonDurableSend(!config.isUseDuplicateDetection());
Show replies by date