JBoss hornetq SVN: r8526 - trunk/src/main/org/hornetq/core/management/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2009-12-03 10:13:37 -0500 (Thu, 03 Dec 2009)
New Revision: 8526
Modified:
trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
Log:
Removing waitOnCompletion
Modified: trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-12-03 15:07:58 UTC (rev 8525)
+++ trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-12-03 15:13:37 UTC (rev 8526)
@@ -743,12 +743,6 @@
}
}
}
-
- if (storageManager != null)
- {
- storageManager.waitOnOperations(managementRequestTimeout);
- storageManager.clearContext();
- }
}
public void enableNotifications(boolean enabled)
15 years, 1 month
JBoss hornetq SVN: r8525 - in trunk/src/main/org/hornetq/core: remoting/impl and 3 other directories.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-12-03 10:07:58 -0500 (Thu, 03 Dec 2009)
New Revision: 8525
Modified:
trunk/src/main/org/hornetq/core/remoting/RemotingConnection.java
trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java
trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
server shutdown
* reverted r8522
* make sure that after acceptors are stopped, all the channels are cleared
before sending DISCONNECT and closing the connections
Modified: trunk/src/main/org/hornetq/core/remoting/RemotingConnection.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/RemotingConnection.java 2009-12-03 14:05:00 UTC (rev 8524)
+++ trunk/src/main/org/hornetq/core/remoting/RemotingConnection.java 2009-12-03 15:07:58 UTC (rev 8525)
@@ -73,4 +73,6 @@
Object getTransferLock();
boolean checkDataReceived();
+
+ void removeAllChannels();
}
Modified: trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java 2009-12-03 14:05:00 UTC (rev 8524)
+++ trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java 2009-12-03 15:07:58 UTC (rev 8525)
@@ -322,6 +322,16 @@
return res;
}
+
+ public void removeAllChannels()
+ {
+ //We get the transfer lock first - this ensures no packets are being processed AND
+ //it's guaranteed no more packets will be processed once this method is complete
+ synchronized (transferLock)
+ {
+ channels.clear();
+ }
+ }
// Buffer Handler implementation
// ----------------------------------------------------
@@ -451,5 +461,4 @@
channel.close();
}
}
-
}
Modified: trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java 2009-12-03 14:05:00 UTC (rev 8524)
+++ trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java 2009-12-03 15:07:58 UTC (rev 8525)
@@ -45,6 +45,4 @@
void freeze();
RemotingConnection getServerSideReplicatingConnection();
-
- void pause() throws Exception;
}
Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 14:05:00 UTC (rev 8524)
+++ trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 15:07:58 UTC (rev 8525)
@@ -209,13 +209,18 @@
}
}
}
-
- public void pause() throws Exception
+
+ public void stop() throws Exception
{
if (!started)
{
return;
}
+
+ if (!started)
+ {
+ return;
+ }
failureCheckThread.close();
@@ -224,40 +229,41 @@
{
acceptor.pause();
}
- }
-
- public void stop() throws Exception
- {
- if (!started)
- {
- return;
- }
- synchronized (server)
+ //Now we ensure that no connections will process any more packets after this method is complete
+ //then send a disconnect packet
+ for (ConnectionEntry entry : connections.values())
{
- for (ConnectionEntry entry : connections.values())
- {
- entry.connection.getChannel(0, -1).sendAndFlush(new PacketImpl(DISCONNECT));
- }
+ RemotingConnection conn = entry.connection;
- for (Acceptor acceptor : acceptors)
- {
- acceptor.stop();
- }
+ Channel channel0 = conn.getChannel(0, -1);
- acceptors.clear();
+ //And we remove all channels from the connection, this ensures no more packets will be processed after this method is
+ //complete
- connections.clear();
+ conn.removeAllChannels();
- if (managementService != null)
- {
- managementService.unregisterAcceptors();
- }
+ //Now we are 100% sure that no more packets will be processed we can send the disconnect
- started = false;
+ channel0.sendAndFlush(new PacketImpl(DISCONNECT));
+ }
+
+ for (Acceptor acceptor : acceptors)
+ {
+ acceptor.stop();
+ }
+ acceptors.clear();
+
+ connections.clear();
+
+ if (managementService != null)
+ {
+ managementService.unregisterAcceptors();
}
+ started = false;
+
}
public boolean isStarted()
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 14:05:00 UTC (rev 8524)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 15:07:58 UTC (rev 8525)
@@ -357,14 +357,6 @@
}
// we stop the remoting service outside a lock
- remotingService.pause();
-
- if (replicationManager != null)
- {
- replicationManager.stop();
- replicationManager = null;
- }
-
remotingService.stop();
synchronized (this)
@@ -402,6 +394,12 @@
{
storageManager.stop();
}
+
+ if (replicationManager != null)
+ {
+ replicationManager.stop();
+ replicationManager = null;
+ }
if (replicationEndpoint != null)
{
15 years, 1 month
JBoss hornetq SVN: r8524 - in trunk/src/main/org/hornetq/core: server/impl and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2009-12-03 09:05:00 -0500 (Thu, 03 Dec 2009)
New Revision: 8524
Modified:
trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
Removing waitOnCompletion at QueueImpl + reverting commit on SessionFactory.
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-12-03 14:02:04 UTC (rev 8523)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-12-03 14:05:00 UTC (rev 8524)
@@ -264,54 +264,58 @@
}
}
- private void initialise() throws Exception
+ private synchronized void initialise() throws Exception
{
- setThreadPools();
+ if (!readOnly)
+ {
+ readOnly = true;
+ setThreadPools();
- instantiateLoadBalancingPolicy();
+ instantiateLoadBalancingPolicy();
- if (discoveryAddress != null)
- {
- InetAddress groupAddress = InetAddress.getByName(discoveryAddress);
+ if (discoveryAddress != null)
+ {
+ InetAddress groupAddress = InetAddress.getByName(discoveryAddress);
- discoveryGroup = new DiscoveryGroupImpl(UUIDGenerator.getInstance().generateStringUUID(),
- discoveryAddress,
- groupAddress,
- discoveryPort,
- discoveryRefreshTimeout);
+ discoveryGroup = new DiscoveryGroupImpl(UUIDGenerator.getInstance().generateStringUUID(),
+ discoveryAddress,
+ groupAddress,
+ discoveryPort,
+ discoveryRefreshTimeout);
- discoveryGroup.registerListener(this);
+ discoveryGroup.registerListener(this);
- discoveryGroup.start();
- }
- else if (staticConnectors != null)
- {
- for (Pair<TransportConfiguration, TransportConfiguration> pair : staticConnectors)
+ discoveryGroup.start();
+ }
+ else if (staticConnectors != null)
{
- FailoverManager cm = new FailoverManagerImpl(this,
- pair.a,
- pair.b,
- failoverOnServerShutdown,
- callTimeout,
- clientFailureCheckPeriod,
- connectionTTL,
- retryInterval,
- retryIntervalMultiplier,
- maxRetryInterval,
- reconnectAttempts,
- threadPool,
- scheduledThreadPool,
- interceptors);
+ for (Pair<TransportConfiguration, TransportConfiguration> pair : staticConnectors)
+ {
+ FailoverManager cm = new FailoverManagerImpl(this,
+ pair.a,
+ pair.b,
+ failoverOnServerShutdown,
+ callTimeout,
+ clientFailureCheckPeriod,
+ connectionTTL,
+ retryInterval,
+ retryIntervalMultiplier,
+ maxRetryInterval,
+ reconnectAttempts,
+ threadPool,
+ scheduledThreadPool,
+ interceptors);
- failoverManagerMap.put(pair, cm);
+ failoverManagerMap.put(pair, cm);
+ }
+
+ updatefailoverManagerArray();
}
-
- updatefailoverManagerArray();
+ else
+ {
+ throw new IllegalStateException("Before using a session factory you must either set discovery address and port or " + "provide some static transport configuration");
+ }
}
- else
- {
- throw new IllegalStateException("Before using a session factory you must either set discovery address and port or " + "provide some static transport configuration");
- }
}
// Static
@@ -1077,7 +1081,7 @@
}
}
- private synchronized ClientSession createSessionInternal(final String username,
+ private ClientSession createSessionInternal(final String username,
final String password,
final boolean xa,
final boolean autoCommitSends,
@@ -1100,8 +1104,6 @@
{
throw new HornetQException(HornetQException.INTERNAL_ERROR, "Failed to initialise session factory", e);
}
-
- readOnly = true;
}
if (discoveryGroup != null && !receivedBroadcast)
@@ -1115,32 +1117,35 @@
}
}
- int pos = loadBalancingPolicy.select(failoverManagerArray.length);
+ synchronized (this)
+ {
+ int pos = loadBalancingPolicy.select(failoverManagerArray.length);
- FailoverManager failoverManager = failoverManagerArray[pos];
+ FailoverManager failoverManager = failoverManagerArray[pos];
- ClientSession session = failoverManager.createSession(username,
- password,
- xa,
- autoCommitSends,
- autoCommitAcks,
- preAcknowledge,
- ackBatchSize,
- cacheLargeMessagesClient,
- minLargeMessageSize,
- blockOnAcknowledge,
- autoGroup,
- confirmationWindowSize,
- producerWindowSize,
- consumerWindowSize,
- producerMaxRate,
- consumerMaxRate,
- blockOnNonPersistentSend,
- blockOnPersistentSend,
- initialMessagePacketSize,
- groupID);
+ ClientSession session = failoverManager.createSession(username,
+ password,
+ xa,
+ autoCommitSends,
+ autoCommitAcks,
+ preAcknowledge,
+ ackBatchSize,
+ cacheLargeMessagesClient,
+ minLargeMessageSize,
+ blockOnAcknowledge,
+ autoGroup,
+ confirmationWindowSize,
+ producerWindowSize,
+ consumerWindowSize,
+ producerMaxRate,
+ consumerMaxRate,
+ blockOnNonPersistentSend,
+ blockOnPersistentSend,
+ initialMessagePacketSize,
+ groupID);
- return session;
+ return session;
+ }
}
private void instantiateLoadBalancingPolicy()
Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-03 14:02:04 UTC (rev 8523)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-03 14:05:00 UTC (rev 8524)
@@ -922,7 +922,6 @@
if (message.isDurable() && durable)
{
storageManager.updateDeliveryCount(reference);
- storageManager.waitOnOperations();
}
AddressSettings addressSettings = addressSettingsRepository.getMatch(address.toString());
@@ -932,7 +931,6 @@
if (maxDeliveries > 0 && reference.getDeliveryCount() >= maxDeliveries)
{
sendToDeadLetterAddress(reference);
- storageManager.waitOnOperations();
return false;
}
15 years, 1 month
JBoss hornetq SVN: r8523 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-03 09:02:04 -0500 (Thu, 03 Dec 2009)
New Revision: 8523
Modified:
trunk/docs/user-manual/en/logging.xml
Log:
doc updates
Modified: trunk/docs/user-manual/en/logging.xml
===================================================================
--- trunk/docs/user-manual/en/logging.xml 2009-12-03 11:03:26 UTC (rev 8522)
+++ trunk/docs/user-manual/en/logging.xml 2009-12-03 14:02:04 UTC (rev 8523)
@@ -18,43 +18,38 @@
<!-- ============================================================================= -->
<chapter id="logging">
<title>Logging</title>
- <para>HornetQ uses standard <ulink url="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/"
- >JDK logging</ulink>, (a.k.a Java-Util-Logging: JUL), for all its logging. This means we
- have no dependencies on any third party logging framework. Users can provide their own
- logging handler to use or alternatively use the log4j handler supplied by HornetQ.</para>
- <para>The handlers are configured via the JUL <literal>logging.properties</literal> file. This
- default location for this file is under the <literal>lib</literal> directory found in the
- Java home directory but it can be overridden by setting the <literal
- >java.util.logging.config.file</literal> system property to point to the appropriate
- logging.properties file. The standalone HornetQ server does this and the <literal
- >logging.properties</literal> file can be found under the <literal>config</literal>
- directory of the HornetQ installation. </para>
- <para>By default the standalone server is configured to use the standard console handler and a
- file handler that logs to <literal>bin/logs/hornetq.log</literal>.</para>
- <para>Because some of the third party components used to bootstrap HornetQ, i.e. the
- Microcontainer, use the JBoss Logging framework we have supplied a plugin class that
- redirects this to the JUL logger. This is set via a system property, <literal
- >-Dorg.jboss.logging.Logger.pluginClass=org.hornetq.integration.logging.HornetQLoggerPlugin</literal>.
- This is only needed when starting the standalone server and is set in the run script. This
- is not a problem if you are embedding HornetQ in your own code as the Microcontainer won't
- be being used.</para>
+ <para>HornetQ has its own Logging Delegate that has no dependencies on any particular logging
+ framework. The default Delegate delegates all its logs to the standard <ulink
+ url="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/">JDK logging</ulink>,
+ (a.k.a Java-Util-Logging: JUL). By default the server picks up its JUL configuration from a
+ <literal>logging.properties</literal> file found in the config directories. This is
+ configured to use our own HornetQ logging formatter and will log to the console as well as a
+ log file. For more information on configuring JUL visit Suns website.</para>
+ <para>You can configure a different Logging Delegate programatically or via a System
+ Property.</para>
+ <para>To do this programatically simply do the
+ following<programlisting>org.hornetq.core.logging.setDelegateFactory(new Log4jLogDelegateFactory())</programlisting></para>
+ <para>Where <literal>Log4jLogDelegateFactory</literal> is the implementation of <literal
+ >org.hornetq.core.logging.LogDelegateFactory </literal>that you would like to
+ use.</para>
+ <para>To do this via a System Property simply set the property <literal
+ >org.hornetq.logger-delegate-factory-class-name</literal> to the delegate factory being
+ used,
+ i.e.<programlisting>-Dorg.hornetq.logger-delegate-factory-class-name=org.hornetq.integration.logging.Log4jLogDelegateFactory</programlisting></para>
+ <para>As you can see in the above example HornetQ provides some Delegate Factories for your
+ convenience. these are<orderedlist
+ ><listitem><para>org.hornetq.core.logging.impl.JULLogDelegateFactory - the
+ default that uses
+ JUL.</para></listitem><listitem><para>org.hornetq.integration.logging.Log4jLogDelegateFactory
+ - which uses Log4J</para></listitem></orderedlist></para>
<para>If you want configure your client's logging, make sure you provide a <literal
>logging.properties</literal> file and set the <literal
>java.util.logging.config.file</literal> property on client startup</para>
<section>
- <title>Log4j Configuration</title>
- <para>HornetQ supplies a JUL Log4j handler that can be used instead of the defaults if you
- prefer to work with log4j logs. To use this simply edit the logging.properties file as
- such:</para>
- <programlisting>handlers=org.hornetq.integration.logging.Log4jLoggerHandler</programlisting>
- <para>You will also need to download the Log4j jars and place them in the <literal
- >lib</literal> directory and also provide a log4j configuration and place it on the
- appropriate config directory, i.e. <literal>config/common</literal>.</para>
- </section>
- <section>
<title>Logging With The JBoss Application Server</title>
- <para>When HornetQ is deployed within the Application Server then it will still use JUL
- however the logging is redirected to the default JBoss logger. For more information on
- this refer to the JBoss documentation.</para>
+ <para>When HornetQ is deployed within the JBoss Application Server version 5.x or above then
+ it will still use JUL however the logging is redirected to the default JBoss logger. For
+ more information on this refer to the JBoss documentation. In versions before this you
+ must specify what logger delegate you want to use.</para>
</section>
</chapter>
15 years, 1 month
JBoss hornetq SVN: r8522 - in trunk/src/main/org/hornetq/core: remoting/server/impl and 2 other directories.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-12-03 06:03:26 -0500 (Thu, 03 Dec 2009)
New Revision: 8522
Modified:
trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
server shutdown
* splitting RemotingService.stop() in pause() and stop()
* in-between, stop the replication manager
Modified: trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java 2009-12-03 10:43:37 UTC (rev 8521)
+++ trunk/src/main/org/hornetq/core/remoting/server/RemotingService.java 2009-12-03 11:03:26 UTC (rev 8522)
@@ -45,4 +45,6 @@
void freeze();
RemotingConnection getServerSideReplicatingConnection();
+
+ void pause() throws Exception;
}
Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
+++ trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 11:03:26 UTC (rev 8522)
@@ -209,8 +209,8 @@
}
}
}
-
- public void stop() throws Exception
+
+ public void pause() throws Exception
{
if (!started)
{
@@ -224,6 +224,14 @@
{
acceptor.pause();
}
+ }
+
+ public void stop() throws Exception
+ {
+ if (!started)
+ {
+ return;
+ }
synchronized (server)
{
Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
+++ trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-12-03 11:03:26 UTC (rev 8522)
@@ -83,6 +83,8 @@
private final ExecutorFactory executorFactory;
+ private SessionFailureListener failureListener;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -326,7 +328,7 @@
mainChannel.sendBlocking(replicationStartPackage);
- failoverManager.addFailureListener(new SessionFailureListener()
+ failureListener = new SessionFailureListener()
{
public void connectionFailed(HornetQException me)
{
@@ -353,7 +355,8 @@
public void beforeReconnect(HornetQException me)
{
}
- });
+ };
+ failoverManager.addFailureListener(failureListener);
started = true;
@@ -393,7 +396,7 @@
}
failoverManager.causeExit();
-
+ failoverManager.removeFailureListener(failureListener);
if (replicatingConnection != null)
{
replicatingConnection.destroy();
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 11:03:26 UTC (rev 8522)
@@ -357,6 +357,14 @@
}
// we stop the remoting service outside a lock
+ remotingService.pause();
+
+ if (replicationManager != null)
+ {
+ replicationManager.stop();
+ replicationManager = null;
+ }
+
remotingService.stop();
synchronized (this)
@@ -395,24 +403,12 @@
storageManager.stop();
}
- if (replicationManager != null)
- {
- replicationManager.stop();
- replicationManager = null;
- }
-
if (replicationEndpoint != null)
{
replicationEndpoint.stop();
replicationEndpoint = null;
}
- if (replicationManager != null)
- {
- replicationManager.stop();
- replicationManager = null;
- }
-
if (securityManager != null)
{
securityManager.stop();
15 years, 1 month
JBoss hornetq SVN: r8521 - in trunk: src/config/common/schema and 8 other directories.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-03 05:43:37 -0500 (Thu, 03 Dec 2009)
New Revision: 8521
Modified:
trunk/docs/user-manual/en/configuration-index.xml
trunk/src/config/common/schema/hornetq-configuration.xsd
trunk/src/main/org/hornetq/core/config/Configuration.java
trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java
trunk/src/main/org/hornetq/core/remoting/impl/wireformat/CreateReplicationSessionMessage.java
trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
trunk/src/main/org/hornetq/core/server/impl/HornetQPacketHandler.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
trunk/tests/config/ConfigurationTest-full-config.xml
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
Log:
don't use reattach on the backup connection
Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/docs/user-manual/en/configuration-index.xml 2009-12-03 10:43:37 UTC (rev 8521)
@@ -57,13 +57,6 @@
<entry/>
</row>
<row>
- <entry><link linkend="configuring.live.backup"
- >backup-window-size</link></entry>
- <entry>int</entry>
- <entry>The Window Size used to flow control between live and backup</entry>
- <entry>1 MiB</entry>
- </row>
- <row>
<entry><link linkend="configuring.bindings.journal"
>bindings-directory</link></entry>
<entry>String</entry>
Modified: trunk/src/config/common/schema/hornetq-configuration.xsd
===================================================================
--- trunk/src/config/common/schema/hornetq-configuration.xsd 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/config/common/schema/hornetq-configuration.xsd 2009-12-03 10:43:37 UTC (rev 8521)
@@ -74,9 +74,7 @@
<xsd:element maxOccurs="1" minOccurs="0" name="persist-delivery-count-before-delivery" type="xsd:boolean">
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="backup-connector-ref" type="backup-connectorType">
- </xsd:element>
- <xsd:element maxOccurs="1" minOccurs="0" name="backup-window-size" type="xsd:int">
- </xsd:element>
+ </xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="connectors">
<xsd:complexType>
<xsd:sequence>
Modified: trunk/src/main/org/hornetq/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/Configuration.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/config/Configuration.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -120,10 +120,6 @@
String getBackupConnectorName();
- int getBackupWindowSize();
-
- void setBackupWindowSize(int windowSize);
-
void setBackupConnectorName(String name);
List<BroadcastGroupConfiguration> getBroadcastGroupConfigurations();
Modified: trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -113,8 +113,6 @@
public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = (int)(1000000000d / 300);
public static final int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = 490 * 1024;
-
-
public static final boolean DEFAULT_JOURNAL_LOG_WRITE_RATE = false;
@@ -176,8 +174,6 @@
public static final long DEFAULT_MEMORY_MEASURE_INTERVAL = -1; // in milliseconds
- public static final int DEFAULT_BACKUP_WINDOW_SIZE = 1024 * 1024;
-
public static final String DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME = JULLogDelegateFactory.class.getCanonicalName();
// Attributes -----------------------------------------------------------------------------
@@ -230,8 +226,6 @@
protected String backupConnectorName;
- protected int backupWindowSize = DEFAULT_BACKUP_WINDOW_SIZE;
-
protected List<BridgeConfiguration> bridgeConfigurations = new ArrayList<BridgeConfiguration>();
protected List<DivertConfiguration> divertConfigurations = new ArrayList<DivertConfiguration>();
@@ -274,22 +268,19 @@
protected int journalMinFiles = DEFAULT_JOURNAL_MIN_FILES;
-
- //AIO and NIO need different values for these attributes
-
+ // AIO and NIO need different values for these attributes
+
protected int journalMaxIO_AIO = DEFAULT_JOURNAL_MAX_IO_AIO;
protected int journalBufferTimeout_AIO = DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO;
protected int journalBufferSize_AIO = DEFAULT_JOURNAL_BUFFER_SIZE_AIO;
-
+
protected int journalMaxIO_NIO = DEFAULT_JOURNAL_MAX_IO_NIO;
protected int journalBufferTimeout_NIO = DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO;
protected int journalBufferSize_NIO = DEFAULT_JOURNAL_BUFFER_SIZE_NIO;
-
-
protected boolean logJournalWriteRate = DEFAULT_JOURNAL_LOG_WRITE_RATE;
@@ -509,19 +500,6 @@
this.backupConnectorName = backupConnectorName;
}
- /* (non-Javadoc)
- * @see org.hornetq.core.config.Configuration#getBackupWindowSize()
- */
- public int getBackupWindowSize()
- {
- return backupWindowSize;
- }
-
- public void setBackupWindowSize(int windowSize)
- {
- this.backupWindowSize = windowSize;
- }
-
public GroupingHandlerConfiguration getGroupingHandlerConfiguration()
{
return groupingHandlerConfiguration;
@@ -966,8 +944,6 @@
{
this.logDelegateFactoryClassName = className;
}
-
-
public int getJournalMaxIO_AIO()
{
@@ -998,8 +974,7 @@
{
this.journalBufferSize_AIO = journalBufferSize;
}
-
-
+
public int getJournalMaxIO_NIO()
{
return journalMaxIO_NIO;
@@ -1029,8 +1004,6 @@
{
this.journalBufferSize_NIO = journalBufferSize;
}
-
-
@Override
public boolean equals(Object obj)
@@ -1063,11 +1036,6 @@
else if (!bindingsDirectory.equals(other.bindingsDirectory))
return false;
- if (backupWindowSize != other.backupWindowSize)
- {
- return false;
- }
-
if (clustered != other.clustered)
return false;
if (connectionTTLOverride != other.connectionTTLOverride)
@@ -1090,13 +1058,13 @@
if (journalBufferTimeout_AIO != other.journalBufferTimeout_AIO)
return false;
if (journalMaxIO_AIO != other.journalMaxIO_AIO)
- return false;
+ return false;
if (this.journalBufferSize_NIO != other.journalBufferSize_NIO)
return false;
if (journalBufferTimeout_NIO != other.journalBufferTimeout_NIO)
return false;
if (journalMaxIO_NIO != other.journalMaxIO_NIO)
- return false;
+ return false;
if (journalCompactMinFiles != other.journalCompactMinFiles)
return false;
if (journalCompactPercentage != other.journalCompactPercentage)
Modified: trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -395,10 +395,7 @@
memoryWarningThreshold = getInteger(e, "memory-warning-threshold", memoryWarningThreshold, PERCENTAGE);
memoryMeasureInterval = getLong(e, "memory-measure-interval", memoryMeasureInterval, MINUS_ONE_OR_GT_ZERO); // in
- // milliseconds
- backupWindowSize = getInteger(e, "backup-window-size", DEFAULT_BACKUP_WINDOW_SIZE, MINUS_ONE_OR_GT_ZERO);
-
started = true;
}
Modified: trunk/src/main/org/hornetq/core/remoting/impl/wireformat/CreateReplicationSessionMessage.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/wireformat/CreateReplicationSessionMessage.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/remoting/impl/wireformat/CreateReplicationSessionMessage.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -27,19 +27,15 @@
private long sessionChannelID;
- private int windowSize;
-
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
- public CreateReplicationSessionMessage(final long sessionChannelID, final int windowSize)
+ public CreateReplicationSessionMessage(final long sessionChannelID)
{
super(CREATE_REPLICATION);
this.sessionChannelID = sessionChannelID;
-
- this.windowSize = windowSize;
}
public CreateReplicationSessionMessage()
@@ -53,14 +49,12 @@
public void encodeRest(final HornetQBuffer buffer)
{
buffer.writeLong(sessionChannelID);
- buffer.writeInt(windowSize);
}
@Override
public void decodeRest(final HornetQBuffer buffer)
{
sessionChannelID = buffer.readLong();
- windowSize = buffer.readInt();
}
/**
@@ -71,14 +65,6 @@
return sessionChannelID;
}
- /**
- * @return the windowSize
- */
- public int getWindowSize()
- {
- return windowSize;
- }
-
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -173,8 +173,6 @@
response = new HornetQExceptionMessage((HornetQException)e);
}
- channel.confirm(packet);
-
channel.send(response);
}
Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -65,13 +65,11 @@
// Attributes ----------------------------------------------------
- private final int backupWindowSize;
-
private final ResponseHandler responseHandler = new ResponseHandler();
private final FailoverManager failoverManager;
- private RemotingConnection connection;
+ private RemotingConnection replicatingConnection;
private Channel replicatingChannel;
@@ -92,11 +90,10 @@
/**
* @param replicationConnectionManager
*/
- public ReplicationManagerImpl(final FailoverManager failoverManager, final ExecutorFactory executorFactory, final int backupWindowSize)
+ public ReplicationManagerImpl(final FailoverManager failoverManager, final ExecutorFactory executorFactory)
{
super();
- this.failoverManager = failoverManager;
- this.backupWindowSize = backupWindowSize;
+ this.failoverManager = failoverManager;
this.executorFactory = executorFactory;
}
@@ -307,25 +304,25 @@
{
throw new IllegalStateException("ReplicationManager is already started");
}
- connection = failoverManager.getConnection();
+
+ replicatingConnection = failoverManager.getConnection();
- if (connection == null)
+ if (replicatingConnection == null)
{
log.warn("Backup server MUST be started before live server. Initialisation will not proceed.");
throw new HornetQException(HornetQException.ILLEGAL_STATE,
"Backup server MUST be started before live server. Initialisation will not proceed.");
}
- long channelID = connection.generateChannelID();
+ long channelID = replicatingConnection.generateChannelID();
- Channel mainChannel = connection.getChannel(1, -1);
+ Channel mainChannel = replicatingConnection.getChannel(1, -1);
- replicatingChannel = connection.getChannel(channelID, backupWindowSize);
+ replicatingChannel = replicatingConnection.getChannel(channelID, -1);
replicatingChannel.setHandler(responseHandler);
- CreateReplicationSessionMessage replicationStartPackage = new CreateReplicationSessionMessage(channelID,
- backupWindowSize);
+ CreateReplicationSessionMessage replicationStartPackage = new CreateReplicationSessionMessage(channelID);
mainChannel.sendBlocking(replicationStartPackage);
@@ -333,7 +330,16 @@
{
public void connectionFailed(HornetQException me)
{
- log.warn("Connection to the backup node failed, removing replication now", me);
+ if (me.getCode() == HornetQException.DISCONNECTED)
+ {
+ //Backup has shut down - no need to log a stack trace
+ log.warn("The backup node has been shut-down, replication will now stop");
+ }
+ else
+ {
+ log.warn("Connection to the backup node failed, removing replication now", me);
+ }
+
try
{
stop();
@@ -386,17 +392,15 @@
replicatingChannel.close();
}
- started = false;
-
failoverManager.causeExit();
- if (connection != null)
+ if (replicatingConnection != null)
{
- connection.destroy();
+ replicatingConnection.destroy();
}
- connection = null;
-
+ replicatingConnection = null;
+
started = false;
}
@@ -491,8 +495,6 @@
{
replicated();
}
-
- replicatingChannel.confirm(packet);
}
}
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQPacketHandler.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQPacketHandler.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQPacketHandler.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -192,7 +192,7 @@
try
{
- Channel channel = connection.getChannel(request.getSessionChannelID(), request.getWindowSize());
+ Channel channel = connection.getChannel(request.getSessionChannelID(), -1);
ReplicationEndpoint endpoint = server.connectToReplicationEndpoint(channel);
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -870,7 +870,7 @@
* Protected so tests can change this behaviour
* @param backupConnector
*/
- protected FailoverManagerImpl createBackupConnection(final TransportConfiguration backupConnector,
+ protected FailoverManagerImpl createBackupConnectionFailoverManager(final TransportConfiguration backupConnector,
final ExecutorService threadPool,
final ScheduledExecutorService scheduledPool)
{
@@ -939,11 +939,10 @@
else
{
- replicationFailoverManager = createBackupConnection(backupConnector, threadPool, scheduledPool);
+ replicationFailoverManager = createBackupConnectionFailoverManager(backupConnector, threadPool, scheduledPool);
replicationManager = new ReplicationManagerImpl(replicationFailoverManager,
- executorFactory,
- configuration.getBackupWindowSize());
+ executorFactory);
replicationManager.start();
}
}
Modified: trunk/tests/config/ConfigurationTest-full-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-full-config.xml 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/tests/config/ConfigurationTest-full-config.xml 2009-12-03 10:43:37 UTC (rev 8521)
@@ -55,8 +55,7 @@
<class-name>org.hornetq.tests.unit.core.config.impl.TestInterceptor2</class-name>
</remoting-interceptors>
- <backup-connector-ref connector-name="backup-connector" />
- <backup-window-size>1024</backup-window-size>
+ <backup-connector-ref connector-name="backup-connector" />
<connectors>
<connector name="connector1">
<factory-class>org.hornetq.tests.unit.core.config.impl.TestConnectorFactory1</factory-class>
Modified: trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -119,8 +119,7 @@
try
{
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
manager.stop();
}
@@ -146,8 +145,7 @@
try
{
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
try
{
@@ -189,16 +187,14 @@
try
{
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
try
{
ReplicationManagerImpl manager2 = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager2.start();
fail("Exception was expected");
@@ -232,8 +228,7 @@
try
{
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
try
{
@@ -270,8 +265,7 @@
StorageManager storage = getStorage();
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
Journal replicatedJournal = new ReplicatedJournal((byte)1, new FakeJournal(), manager);
@@ -377,8 +371,7 @@
{
StorageManager storage = getStorage();
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
Journal replicatedJournal = new ReplicatedJournal((byte)1, new FakeJournal(), manager);
@@ -541,8 +534,7 @@
try
{
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
fail("Exception expected");
}
@@ -569,8 +561,7 @@
{
StorageManager storage = getStorage();
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
Journal replicatedJournal = new ReplicatedJournal((byte)1, new FakeJournal(), manager);
@@ -621,8 +612,7 @@
{
StorageManager storage = getStorage();
ReplicationManagerImpl manager = new ReplicationManagerImpl(failoverManager,
- this.factory,
- ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE);
+ this.factory);
manager.start();
Journal replicatedJournal = new ReplicatedJournal((byte)1, new FakeJournal(), manager);
Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -98,7 +98,6 @@
assertEquals(ConfigurationImpl.DEFAULT_SERVER_DUMP_INTERVAL, conf.getServerDumpInterval());
assertEquals(ConfigurationImpl.DEFAULT_MEMORY_WARNING_THRESHOLD, conf.getMemoryWarningThreshold());
assertEquals(ConfigurationImpl.DEFAULT_MEMORY_MEASURE_INTERVAL, conf.getMemoryMeasureInterval());
- assertEquals(ConfigurationImpl.DEFAULT_BACKUP_WINDOW_SIZE, conf.getBackupWindowSize());
}
public void testSetGetAttributes()
@@ -306,10 +305,6 @@
conf.setTransactionTimeoutScanPeriod(l);
assertEquals(l, conf.getTransactionTimeoutScanPeriod());
- i = randomInt();
- conf.setBackupWindowSize(i);
- assertEquals(i, conf.getBackupWindowSize());
-
s = randomString();
conf.setManagementClusterPassword(s);
assertEquals(s, conf.getManagementClusterPassword());
@@ -534,10 +529,6 @@
s = randomString();
conf.setManagementClusterPassword(s);
assertEquals(s, conf.getManagementClusterPassword());
-
- i = randomInt();
- conf.setBackupWindowSize(i);
- assertEquals(i, conf.getBackupWindowSize());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2009-12-03 10:35:49 UTC (rev 8520)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2009-12-03 10:43:37 UTC (rev 8521)
@@ -84,8 +84,7 @@
assertEquals("largemessagesdir", conf.getLargeMessagesDirectory());
assertEquals(95, conf.getMemoryWarningThreshold());
- assertEquals(1024, conf.getBackupWindowSize());
-
+
assertEquals(2, conf.getInterceptorClassNames().size());
assertTrue(conf.getInterceptorClassNames().contains("org.hornetq.tests.unit.core.config.impl.TestInterceptor1"));
assertTrue(conf.getInterceptorClassNames().contains("org.hornetq.tests.unit.core.config.impl.TestInterceptor2"));
15 years, 1 month
JBoss hornetq SVN: r8520 - trunk/tests/src/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-03 05:35:49 -0500 (Thu, 03 Dec 2009)
New Revision: 8520
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java
Log:
fixed test
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java 2009-12-03 10:21:37 UTC (rev 8519)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java 2009-12-03 10:35:49 UTC (rev 8520)
@@ -34,6 +34,8 @@
*/
public abstract class GroupingFailoverTestBase extends ClusterTestBase
{
+
+
public void testGroupingLocalHandlerFails() throws Exception
{
setupReplicatedServer(2, isFileStorage(), isNetty(), 0);
@@ -121,7 +123,7 @@
waitForBindings(1, "queues.testaddress", 1, 1, false);
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
verifyReceiveAll(10, 2);
@@ -230,12 +232,12 @@
waitForBindings(1, "queues.testaddress", 1, 1, false);
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id2"));
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id3"));
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id4"));
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id5"));
- sendWithProperty(1, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id6"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id1"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id2"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id3"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id4"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id5"));
+ sendWithProperty(2, "queues.testaddress", 10, false, MessageImpl.HDR_GROUP_ID, new SimpleString("id6"));
verifyReceiveAllWithGroupIDRoundRobin(0, 30, 1, 2);
15 years, 1 month
JBoss hornetq SVN: r8519 - trunk/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-12-03 05:21:37 -0500 (Thu, 03 Dec 2009)
New Revision: 8519
Modified:
trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
Log:
change connection failure message
* make it easier to find it in the logs
Modified: trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-12-03 10:20:31 UTC (rev 8518)
+++ trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-12-03 10:21:37 UTC (rev 8519)
@@ -133,7 +133,7 @@
{
for (RemotingConnection conn : conns)
{
- conn.fail(new HornetQException(HornetQException.INTERNAL_ERROR, "blah"));
+ conn.fail(new HornetQException(HornetQException.INTERNAL_ERROR, "simulated connection failure"));
}
}
}
15 years, 1 month
JBoss hornetq SVN: r8518 - in trunk: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-12-03 05:20:31 -0500 (Thu, 03 Dec 2009)
New Revision: 8518
Modified:
trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
modified QueueImpl.toString() + failover failure info
Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-03 10:09:13 UTC (rev 8517)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-03 10:20:31 UTC (rev 8518)
@@ -867,7 +867,7 @@
@Override
public String toString()
{
- return "QueueImpl(name=" + name.toString() + ")";
+ return "QueueImpl[name=" + name.toString() + "]@" + Integer.toHexString(System.identityHashCode(this));
}
// Private
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-12-03 10:09:13 UTC (rev 8517)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-12-03 10:20:31 UTC (rev 8518)
@@ -265,8 +265,7 @@
// System.out.println(threadDump(" - fired by ClusterTestBase::waitForBindings"));
String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount +
- ", totConsumers = " +
- totConsumers;
+ ", totConsumers = " + totConsumers + ")";
log.error(msg);
@@ -285,7 +284,7 @@
{
QueueBinding qBinding = (QueueBinding)binding;
- System.out.println("Binding = " + qBinding + " with #consumers = " + qBinding.consumerCount());
+ System.out.println("Binding = " + qBinding + ", queue=" + qBinding.getQueue());
}
}
System.out.println("=======================================================================");
15 years, 1 month
JBoss hornetq SVN: r8517 - trunk/src/main/org/hornetq/core/remoting/server/impl.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-12-03 05:09:13 -0500 (Thu, 03 Dec 2009)
New Revision: 8517
Modified:
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
Log:
fixed RemotingServiceImpl.freeze()
* pause the acceptors instead of stopping them. This will not close the existing connections
on the client side which can then simulate a connection failure in ClusterWithBackupFailoverTestBase.failNode()
Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 08:29:30 UTC (rev 8516)
+++ trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-12-03 10:09:13 UTC (rev 8517)
@@ -201,7 +201,7 @@
{
try
{
- acceptor.stop();
+ acceptor.pause();
}
catch (Exception e)
{
15 years, 1 month