Author: timfox
Date: 2009-09-29 13:27:11 -0400 (Tue, 29 Sep 2009)
New Revision: 8008
Modified:
trunk/src/config/common/schema/hornetq-jms.xsd
trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java
trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/src/main/org/hornetq/core/client/impl/ConnectionManagerImpl.java
trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
trunk/src/main/org/hornetq/jms/server/JMSServerManager.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java
trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java
trunk/tests/config/hornetq-jms-for-JMSServerDeployerTest.xml
trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
trunk/tests/joram-tests/src/org/objectweb/jtests/jms/conform/selector/SelectorTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/client/ResendTest.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/util/JMSTestBase.java
Log:
added max retry interval
https://jira.jboss.org/jira/browse/HORNETQ-147
Modified: trunk/src/config/common/schema/hornetq-jms.xsd
===================================================================
--- trunk/src/config/common/schema/hornetq-jms.xsd 2009-09-29 13:34:52 UTC (rev 8007)
+++ trunk/src/config/common/schema/hornetq-jms.xsd 2009-09-29 17:27:11 UTC (rev 8008)
@@ -98,7 +98,10 @@
</xsd:element>
<xsd:element name="retry-interval-multiplier"
type="xsd:float"
maxOccurs="1" minOccurs="0">
- </xsd:element>
+ </xsd:element>
+ <xsd:element name="max-retry-interval" type="xsd:long"
+ maxOccurs="1" minOccurs="0">
+ </xsd:element>
<xsd:element name="reconnect-attempts" type="xsd:int"
maxOccurs="1" minOccurs="0">
</xsd:element>
Modified: trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java 2009-09-29 13:34:52
UTC (rev 8007)
+++ trunk/src/main/org/hornetq/core/client/ClientSessionFactory.java 2009-09-29 17:27:11
UTC (rev 8008)
@@ -141,7 +141,11 @@
double getRetryIntervalMultiplier();
void setRetryIntervalMultiplier(double retryIntervalMultiplier);
+
+ long getMaxRetryInterval();
+ void setMaxRetryInterval(long maxRetryInterval);
+
int getReconnectAttempts();
void setReconnectAttempts(int reconnectAttempts);
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -100,6 +100,8 @@
public static final long DEFAULT_RETRY_INTERVAL = 2000;
public static final double DEFAULT_RETRY_INTERVAL_MULTIPLIER = 1d;
+
+ public static final long DEFAULT_MAX_RETRY_INTERVAL = 2000;
public static final int DEFAULT_RECONNECT_ATTEMPTS = 0;
@@ -189,6 +191,8 @@
private long retryInterval;
private double retryIntervalMultiplier;
+
+ private long maxRetryInterval;
private int reconnectAttempts;
@@ -290,6 +294,7 @@
connectionTTL,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
useReattach,
threadPool,
@@ -360,6 +365,8 @@
retryInterval = DEFAULT_RETRY_INTERVAL;
retryIntervalMultiplier = DEFAULT_RETRY_INTERVAL_MULTIPLIER;
+
+ maxRetryInterval = DEFAULT_MAX_RETRY_INTERVAL;
reconnectAttempts = DEFAULT_RECONNECT_ATTEMPTS;
@@ -643,7 +650,18 @@
checkWrite();
this.retryInterval = retryInterval;
}
+
+ public synchronized long getMaxRetryInterval()
+ {
+ return maxRetryInterval;
+ }
+ public synchronized void setMaxRetryInterval(long retryInterval)
+ {
+ checkWrite();
+ this.maxRetryInterval = retryInterval;
+ }
+
public synchronized double getRetryIntervalMultiplier()
{
return retryIntervalMultiplier;
@@ -938,6 +956,7 @@
connectionTTL,
retryInterval,
retryIntervalMultiplier,
+
maxRetryInterval,
reconnectAttempts,
useReattach,
threadPool,
Modified: trunk/src/main/org/hornetq/core/client/impl/ConnectionManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ConnectionManagerImpl.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/src/main/org/hornetq/core/client/impl/ConnectionManagerImpl.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -127,6 +127,8 @@
private final long retryInterval;
private final double retryIntervalMultiplier; // For exponential backoff
+
+ private final long maxRetryInterval;
private final int reconnectAttempts;
@@ -175,6 +177,7 @@
final long connectionTTL,
final long retryInterval,
final double retryIntervalMultiplier,
+ final long maxRetryInterval,
final int reconnectAttempts,
final boolean useReattach,
final ExecutorService threadPool,
@@ -217,6 +220,8 @@
this.retryInterval = retryInterval;
this.retryIntervalMultiplier = retryIntervalMultiplier;
+
+ this.maxRetryInterval = maxRetryInterval;
this.reconnectAttempts = reconnectAttempts;
@@ -836,6 +841,8 @@
try
{
+ log.info("sleeping " + interval);
+
Thread.sleep(interval);
}
catch (InterruptedException ignore)
@@ -843,7 +850,14 @@
}
// Exponential back-off
- interval *= retryIntervalMultiplier;
+ long newInterval = (long)((double)interval * retryIntervalMultiplier);
+
+ if (newInterval > maxRetryInterval)
+ {
+ newInterval = maxRetryInterval;
+ }
+
+ interval = newInterval;
}
else
{
Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -442,7 +442,17 @@
{
sessionFactory.setRetryInterval(retryInterval);
}
+
+ public synchronized long getMaxRetryInterval()
+ {
+ return sessionFactory.getMaxRetryInterval();
+ }
+ public synchronized void setMaxRetryInterval(long retryInterval)
+ {
+ sessionFactory.setMaxRetryInterval(retryInterval);
+ }
+
public synchronized double getRetryIntervalMultiplier()
{
return sessionFactory.getRetryIntervalMultiplier();
Modified: trunk/src/main/org/hornetq/jms/server/JMSServerManager.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/JMSServerManager.java 2009-09-29 13:34:52 UTC
(rev 8007)
+++ trunk/src/main/org/hornetq/jms/server/JMSServerManager.java 2009-09-29 17:27:11 UTC
(rev 8008)
@@ -162,6 +162,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
List<String> jndiBindings) throws Exception;
@@ -195,6 +196,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
List<String> jndiBindings) throws Exception;
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java 2009-09-29 13:34:52
UTC (rev 8007)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java 2009-09-29 17:27:11
UTC (rev 8008)
@@ -144,6 +144,7 @@
boolean preAcknowledge = getBoolean(e, "pre-acknowledge",
ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE);
long retryInterval = getLong(e, "retry-interval",
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL, GT_ZERO);
double retryIntervalMultiplier = getDouble(e,
"retry-interval-multiplier",
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER, GT_ZERO);
+ long maxRetryInterval = getLong(e, "max-retry-interval",
ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL, GT_ZERO);
int reconnectAttempts = getInteger(e, "reconnect-attempts",
ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS, MINUS_ONE_OR_GE_ZERO);
boolean failoverOnServerShutdown = getBoolean(e,
"failover-on-server-shutdown",
ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN);
boolean useGlobalPools = getBoolean(e, "use-global-pools",
ClientSessionFactoryImpl.DEFAULT_USE_GLOBAL_POOLS);
@@ -257,6 +258,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
@@ -289,6 +291,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -368,6 +368,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
List<String> jndiBindings)
throws Exception
@@ -401,6 +402,7 @@
cf.setThreadPoolMaxSize(threadPoolMaxSize);
cf.setRetryInterval(retryInterval);
cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
+ cf.setMaxRetryInterval(maxRetryInterval);
cf.setReconnectAttempts(reconnectAttempts);
cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
}
@@ -437,6 +439,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
List<String> jndiBindings)
throws Exception
@@ -472,6 +475,7 @@
cf.setThreadPoolMaxSize(threadPoolMaxSize);
cf.setRetryInterval(retryInterval);
cf.setRetryIntervalMultiplier(retryIntervalMultiplier);
+ cf.setMaxRetryInterval(maxRetryInterval);
cf.setReconnectAttempts(reconnectAttempts);
cf.setFailoverOnServerShutdown(failoverOnServerShutdown);
}
Modified: trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -119,6 +119,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
Object[] jndiBindings) throws Exception;
@@ -152,6 +153,7 @@
@Parameter(name = "threadPoolMaxSize") int
threadPoolMaxSize,
@Parameter(name = "retryInterval") long
retryInterval,
@Parameter(name = "retryIntervalMultiplier")
double retryIntervalMultiplier,
+ @Parameter(name = "maxRetryInterval") long
maxRetryInterval,
@Parameter(name = "reconnectAttempts") int
reconnectAttempts,
@Parameter(name = "failoverOnServerShutdown")
boolean failoverOnServerShutdown,
@Parameter(name = "jndiBindings", desc =
"comma-separated list of JNDI bindings") String jndiBindings) throws Exception;
@@ -198,6 +200,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
Object[] jndiBindings) throws Exception;
@@ -232,6 +235,7 @@
@Parameter(name = "threadPoolMaxSize") int
threadPoolMaxSize,
@Parameter(name = "retryInterval") long
retryInterval,
@Parameter(name = "retryIntervalMultiplier")
double retryIntervalMultiplier,
+ @Parameter(name = "maxRetryInterval") long
maxRetryInterval,
@Parameter(name = "reconnectAttempts") int
reconnectAttempts,
@Parameter(name = "failoverOnServerShutdown")
boolean failoverOnServerShutdown,
@Parameter(name = "jndiBindings", desc =
"comma-separated list of JNDI bindings") String jndiBindings) throws Exception;
Modified: trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java
===================================================================
---
trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -246,6 +246,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
+ final long maxRetryInterval,
final int reconnectAttempts,
final boolean failoverOnServerShutdown,
final Object[] jndiBindings) throws Exception
@@ -283,6 +284,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindingsList);
@@ -319,6 +321,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
+ final long maxRetryInterval,
final int reconnectAttempts,
final boolean failoverOnServerShutdown,
final String jndiBindings) throws Exception
@@ -358,6 +361,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
bindings);
@@ -416,6 +420,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
+ final long maxRetryInterval,
final int reconnectAttempts,
final boolean failoverOnServerShutdown,
final Object[] jndiBindings) throws Exception
@@ -451,6 +456,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindingsList);
@@ -487,6 +493,7 @@
final int threadPoolMaxSize,
final long retryInterval,
final double retryIntervalMultiplier,
+ final long maxRetryInterval,
final int reconnectAttempts,
final boolean failoverOnServerShutdown,
final String jndiBindings) throws Exception
@@ -522,6 +529,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
bindings);
Modified: trunk/tests/config/hornetq-jms-for-JMSServerDeployerTest.xml
===================================================================
--- trunk/tests/config/hornetq-jms-for-JMSServerDeployerTest.xml 2009-09-29 13:34:52 UTC
(rev 8007)
+++ trunk/tests/config/hornetq-jms-for-JMSServerDeployerTest.xml 2009-09-29 17:27:11 UTC
(rev 8008)
@@ -33,6 +33,7 @@
<reconnect-attempts>34</reconnect-attempts>
<retry-interval>5</retry-interval>
<retry-interval-multiplier>6.0</retry-interval-multiplier>
+ <max-retry-interval>300</max-retry-interval>
</connection-factory>
<queue name="fullConfigurationQueue">
Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/CTSMiscellaneousTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -24,6 +24,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
@@ -43,6 +44,7 @@
import javax.jms.MessageProducer;
import javax.jms.Session;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.utils.Pair;
@@ -112,6 +114,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
DEFAULT_RETRY_INTERVAL,
DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+ DEFAULT_MAX_RETRY_INTERVAL,
DEFAULT_RECONNECT_ATTEMPTS,
DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
jndiBindings);
Modified: trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java 2009-09-29 13:34:52
UTC (rev 8007)
+++ trunk/tests/jms-tests/src/org/hornetq/jms/tests/JMSTestCase.java 2009-09-29 17:27:11
UTC (rev 8008)
@@ -24,6 +24,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
@@ -40,6 +41,7 @@
import javax.naming.InitialContext;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.utils.Pair;
@@ -108,6 +110,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
DEFAULT_RETRY_INTERVAL,
DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+ DEFAULT_MAX_RETRY_INTERVAL,
DEFAULT_RECONNECT_ATTEMPTS,
DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
jndiBindings);
Modified:
trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java
===================================================================
---
trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/jms-tests/src/org/hornetq/jms/tests/tools/container/LocalTestServer.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -23,6 +23,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
@@ -47,6 +48,7 @@
import javax.management.ObjectName;
import javax.naming.InitialContext;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.management.ObjectNames;
@@ -337,6 +339,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
DEFAULT_RETRY_INTERVAL,
DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+ DEFAULT_MAX_RETRY_INTERVAL,
DEFAULT_RECONNECT_ATTEMPTS,
DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
jndiBindings);
Modified:
trunk/tests/joram-tests/src/org/objectweb/jtests/jms/conform/selector/SelectorTest.java
===================================================================
---
trunk/tests/joram-tests/src/org/objectweb/jtests/jms/conform/selector/SelectorTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/joram-tests/src/org/objectweb/jtests/jms/conform/selector/SelectorTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -41,9 +41,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "");
receiverConnection.start();
@@ -52,7 +52,7 @@
message.setText("testEmptyStringAsSelector");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("No message was received", msg != null);
assertEquals("testEmptyStringAsSelector", msg.getText());
}
@@ -75,9 +75,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "string =
'literal''s'");
receiverConnection.start();
@@ -92,7 +92,7 @@
message.setText("testStringLiterals:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("No message was received", msg != null);
assertEquals("testStringLiterals:2", msg.getText());
}
@@ -111,9 +111,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "JMSDeliveryMode =
'PERSISTENT'");
receiverConnection.start();
@@ -128,7 +128,7 @@
// send a message in *persistent*
sender.send(message, DeliveryMode.PERSISTENT, sender.getPriority(),
sender.getTimeToLive());
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("No message was received", msg != null);
// only the message sent in persistent mode should be received.
assertEquals(DeliveryMode.PERSISTENT, msg.getJMSDeliveryMode());
@@ -150,9 +150,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "NumberOfOrders
> 1");
receiverConnection.start();
@@ -167,7 +167,7 @@
message.setText("testIdentifierConversion:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertEquals("testIdentifierConversion:2", msg.getText());
}
catch (JMSException e)
@@ -188,12 +188,12 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue,
- "JMSType = 'car' AND color = 'blue' AND weight >
2500");
+ "JMSType = 'car' AND
color = 'blue' AND weight > 2500");
receiverConnection.start();
TextMessage dummyMessage = senderSession.createTextMessage();
@@ -210,7 +210,7 @@
message.setText("testSelectorExampleFromSpecs:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertEquals("testSelectorExampleFromSpecs:2", msg.getText());
}
catch (JMSException e)
@@ -231,9 +231,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "weight >
2500");
receiverConnection.start();
@@ -248,7 +248,7 @@
message.setText("testGreaterThan:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertEquals("testGreaterThan:2", msg.getText());
}
catch (JMSException e)
@@ -269,9 +269,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "weight =
2500");
receiverConnection.start();
@@ -286,7 +286,7 @@
message.setText("testEquals:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertEquals("testEquals:2", msg.getText());
}
catch (JMSException e)
@@ -307,9 +307,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "weight <>
2500");
receiverConnection.start();
@@ -324,7 +324,7 @@
message.setText("testEquals:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertEquals("testEquals:2", msg.getText());
}
catch (JMSException e)
@@ -345,9 +345,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "age BETWEEN 15
and 19");
receiverConnection.start();
@@ -362,7 +362,7 @@
message.setText("testBetween:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("Message not received", msg != null);
assertTrue("Message of another test: " + msg.getText(),
msg.getText().startsWith("testBetween"));
assertEquals("testBetween:2", msg.getText());
@@ -386,9 +386,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "Country IN
('UK', 'US', 'France')");
receiverConnection.start();
@@ -403,7 +403,7 @@
message.setText("testIn:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("Message not received", msg != null);
assertTrue("Message of another test: " + msg.getText(),
msg.getText().startsWith("testIn"));
assertEquals("testIn:2", msg.getText());
@@ -427,9 +427,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "underscored LIKE
'\\_%' ESCAPE '\\'");
receiverConnection.start();
@@ -444,7 +444,7 @@
message.setText("testLikeEscape:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("Message not received", msg != null);
assertTrue("Message of another test: " + msg.getText(),
msg.getText().startsWith("testLikeEscape"));
assertEquals("testLikeEscape:2", msg.getText());
@@ -468,9 +468,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "word LIKE
'l_se'");
receiverConnection.start();
@@ -485,7 +485,7 @@
message.setText("testLike_2:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("Message not received", msg != null);
assertTrue("Message of another test: " + msg.getText(),
msg.getText().startsWith("testLike_2"));
assertEquals("testLike_2:2", msg.getText());
@@ -509,9 +509,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "phone LIKE
'12%3'");
receiverConnection.start();
@@ -526,7 +526,7 @@
message.setText("testLike_1:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue("Message not received", msg != null);
assertTrue("Message of another test: " + msg.getText(),
msg.getText().startsWith("testLike_1"));
assertEquals("testLike_1:2", msg.getText());
@@ -550,9 +550,9 @@
try
{
receiverConnection.stop();
- if (receiver!=null)
+ if (receiver != null)
{
- receiver.close();
+ receiver.close();
}
receiver = receiverSession.createReceiver(receiverQueue, "prop_name IS
NULL");
receiverConnection.start();
@@ -566,7 +566,7 @@
message.setText("testNull:2");
sender.send(message);
- TextMessage msg = (TextMessage) receiver.receive(TestConfig.TIMEOUT);
+ TextMessage msg = (TextMessage)receiver.receive(TestConfig.TIMEOUT);
assertTrue(msg != null);
assertEquals("testNull:2", msg.getText());
}
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -75,7 +75,7 @@
final int reconnectAttempts = 1;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -153,7 +153,7 @@
final int reconnectAttempts = -1;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -243,28 +243,28 @@
final long asyncFailDelay = 2000;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
sf.setUseReattach(true);
ClientSession session = sf.createSession(false, true, true);
-
+
ClientSession session2 = sf.createSession(false, true, true);
-
+
class MyFailureListener implements FailureListener
{
volatile boolean failed;
-
+
public void connectionFailed(HornetQException me)
{
failed = true;
}
}
-
+
MyFailureListener listener = new MyFailureListener();
-
+
session2.addFailureListener(listener);
session.createQueue(ADDRESS, ADDRESS, null, false);
@@ -290,17 +290,17 @@
InVMConnector.numberOfFailures = 10;
InVMConnector.failOnCreateConnection = true;
- //We need to fail on different connections.
-
- //We fail on one connection then the connection manager tries to reconnect all
connections
- //Then we fail the other, and the connection manager is then called while the
reconnection is occurring
- //We can't use the same connection since RemotingConnectionImpl only allows one
fail to be in process
- //at same time
-
+ // We need to fail on different connections.
+
+ // We fail on one connection then the connection manager tries to reconnect all
connections
+ // Then we fail the other, and the connection manager is then called while the
reconnection is occurring
+ // We can't use the same connection since RemotingConnectionImpl only allows
one fail to be in process
+ // at same time
+
final RemotingConnection conn = ((ClientSessionInternal)session).getConnection();
-
+
final RemotingConnection conn2 =
((ClientSessionInternal)session2).getConnection();
-
+
assertTrue(conn != conn2);
Thread t = new Thread()
@@ -314,7 +314,7 @@
catch (InterruptedException ignore)
{
}
-
+
log.info("calling fail async");
conn2.fail(new HornetQException(HornetQException.NOT_CONNECTED, "Did not
receive pong from server"));
@@ -322,13 +322,13 @@
};
t.start();
-
+
conn.fail(new HornetQException(HornetQException.NOT_CONNECTED));
-
+
assertTrue(listener.failed);
-
- session.start();
+ session.start();
+
for (int i = 0; i < numMessages; i++)
{
ClientMessage message = consumer.receive(500);
@@ -347,7 +347,7 @@
assertNull(message);
session.close();
-
+
session2.close();
sf.close();
@@ -364,7 +364,7 @@
final int reconnectAttempts = 3;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -441,7 +441,7 @@
final int reconnectAttempts = 10;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -509,7 +509,7 @@
final int reconnectAttempts = -1;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -596,12 +596,12 @@
{
final long retryInterval = 500;
- final double retryMultiplier = 4d;
+ final double retryMultiplier = 2d;
final int reconnectAttempts = -1;
ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
-
+
sf.setRetryInterval(retryInterval);
sf.setRetryIntervalMultiplier(retryMultiplier);
sf.setReconnectAttempts(reconnectAttempts);
@@ -630,29 +630,93 @@
ClientConsumer consumer = session.createConsumer(ADDRESS);
InVMConnector.failOnCreateConnection = true;
+ InVMConnector.numberOfFailures = 3;
RemotingConnection conn = ((ClientSessionInternal)session).getConnection();
long start = System.currentTimeMillis();
+
+ conn.fail(new HornetQException(HornetQException.NOT_CONNECTED));
- Thread t = new Thread()
+ session.start();
+
+ for (int i = 0; i < numMessages; i++)
{
- public void run()
- {
- try
- {
- Thread.sleep(retryInterval * 2);
- }
- catch (InterruptedException ignore)
- {
- }
+ ClientMessage message = consumer.receive(500);
- InVMConnector.failOnCreateConnection = false;
- }
- };
+ assertNotNull(message);
- t.start();
+ assertEquals("aardvarks", message.getBody().readString());
+ assertEquals(i, message.getProperty(new SimpleString("count")));
+
+ message.acknowledge();
+ }
+
+ ClientMessage message = consumer.receiveImmediate();
+
+ assertNull(message);
+
+ long end = System.currentTimeMillis();
+
+ double wait = retryInterval + retryMultiplier * retryInterval + retryMultiplier *
retryMultiplier * retryInterval;
+
+ log.info("wait is " + wait);
+
+ assertTrue((end - start) >= wait);
+
+ session.close();
+
+ sf.close();
+ }
+
+ public void testExponentialBackoffMaxRetryInterval() throws Exception
+ {
+ final long retryInterval = 500;
+
+ final double retryMultiplier = 2d;
+
+ final int reconnectAttempts = -1;
+
+ final long maxRetryInterval = 1000;
+
+ ClientSessionFactoryInternal sf = new ClientSessionFactoryImpl(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
+
+ sf.setRetryInterval(retryInterval);
+ sf.setRetryIntervalMultiplier(retryMultiplier);
+ sf.setReconnectAttempts(reconnectAttempts);
+ sf.setMaxRetryInterval(maxRetryInterval);
+ sf.setUseReattach(true);
+
+ ClientSession session = sf.createSession(false, true, true);
+
+ session.createQueue(ADDRESS, ADDRESS, null, false);
+
+ ClientProducer producer = session.createProducer(ADDRESS);
+
+ final int numMessages = 1000;
+
+ for (int i = 0; i < numMessages; i++)
+ {
+ ClientMessage message = session.createClientMessage(HornetQTextMessage.TYPE,
+ false,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
+ message.putIntProperty(new SimpleString("count"), i);
+ message.getBody().writeString("aardvarks");
+ producer.send(message);
+ }
+
+ ClientConsumer consumer = session.createConsumer(ADDRESS);
+
+ InVMConnector.failOnCreateConnection = true;
+ InVMConnector.numberOfFailures = 3;
+
+ RemotingConnection conn = ((ClientSessionInternal)session).getConnection();
+
+ long start = System.currentTimeMillis();
+
conn.fail(new HornetQException(HornetQException.NOT_CONNECTED));
session.start();
@@ -676,13 +740,17 @@
long end = System.currentTimeMillis();
- assertTrue((end - start) >= retryInterval * (1 + retryMultiplier));
+ double wait = retryInterval + retryMultiplier * 2 * retryInterval +
retryMultiplier;
+
+ log.info("wait is " + wait);
+ assertTrue((end - start) >= wait);
+
+ assertTrue((end - start) < wait + 500);
+
session.close();
sf.close();
-
- t.join();
}
// Package protected ---------------------------------------------
@@ -710,7 +778,7 @@
service.stop();
assertEquals(0, InVMRegistry.instance.size());
-
+
service = null;
super.tearDown();
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -171,6 +171,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
retryInterval,
retryIntervalMultiplier,
+ 1000,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -281,6 +281,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
retryInterval,
retryIntervalMultiplier,
+ 1000,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/PreACKJMSTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -25,6 +25,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_WINDOW_SIZE;
@@ -41,6 +42,7 @@
import javax.jms.Session;
import javax.jms.TextMessage;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.tests.util.JMSTestBase;
import org.hornetq.utils.Pair;
@@ -244,6 +246,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
retryInterval,
retryIntervalMultiplier,
+ DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/ResendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/ResendTest.java 2009-09-29
13:34:52 UTC (rev 8007)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/ResendTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -24,6 +24,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
@@ -283,6 +284,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
retryInterval,
retryIntervalMultiplier,
+ DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
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 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -452,6 +452,7 @@
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+
ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL,
ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS,
ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
bindings);
@@ -497,6 +498,7 @@
ClientSessionFactoryImpl.DEFAULT_THREAD_POOL_MAX_SIZE,
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+
ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL,
ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS,
ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
jndiBindings);
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 2009-09-29
13:34:52 UTC (rev 8007)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2009-09-29
17:27:11 UTC (rev 8008)
@@ -121,6 +121,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
Object[] jndiBindings) throws Exception
@@ -154,6 +155,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
@@ -188,6 +190,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
String jndiBindings) throws Exception
@@ -221,6 +224,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
@@ -403,6 +407,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
Object[] jndiBindings) throws Exception
@@ -437,6 +442,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
@@ -472,6 +478,7 @@
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
+ long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnServerShutdown,
String jndiBindings) throws Exception
@@ -506,6 +513,7 @@
threadPoolMaxSize,
retryInterval,
retryIntervalMultiplier,
+ maxRetryInterval,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);
Modified: trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java 2009-09-29 13:34:52 UTC (rev
8007)
+++ trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java 2009-09-29 17:27:11 UTC (rev
8008)
@@ -25,6 +25,7 @@
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
+import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MAX_RETRY_INTERVAL;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE;
import static
org.hornetq.core.client.impl.ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE;
@@ -40,6 +41,7 @@
import javax.jms.Queue;
import javax.naming.NamingException;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.server.HornetQ;
@@ -223,6 +225,7 @@
DEFAULT_THREAD_POOL_MAX_SIZE,
retryInterval,
retryIntervalMultiplier,
+ DEFAULT_MAX_RETRY_INTERVAL,
reconnectAttempts,
failoverOnServerShutdown,
jndiBindings);