JBoss hornetq SVN: r10883 - trunk/hornetq-core.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:41:00 -0400 (Mon, 27 Jun 2011)
New Revision: 10883
Modified:
trunk/hornetq-core/pom.xml
Log:
Workaround for Eclipse m2e's lack of javacc support.
Modified: trunk/hornetq-core/pom.xml
===================================================================
--- trunk/hornetq-core/pom.xml 2011-06-27 13:39:55 UTC (rev 10882)
+++ trunk/hornetq-core/pom.xml 2011-06-27 13:41:00 UTC (rev 10883)
@@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -88,6 +88,36 @@
</executions>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence
+ on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <versionRange>[2.6,)</versionRange>
+ <goals>
+ <goal>javacc</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</project>
13 years, 8 months
JBoss hornetq SVN: r10882 - in trunk/hornetq-core/src/main/java/org/hornetq: core/replication/impl and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:39:55 -0400 (Mon, 27 Jun 2011)
New Revision: 10882
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java
trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java
trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java
trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java
Log:
Small javadoc fixes.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java 2011-06-27 13:38:04 UTC (rev 10881)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/CoreRemotingConnection.java 2011-06-27 13:39:55 UTC (rev 10882)
@@ -24,7 +24,7 @@
*
*/
public interface CoreRemotingConnection extends RemotingConnection
-{
+{
/**
* return the channel with the channel id specified.
* <p/>
@@ -74,7 +74,7 @@
long getIDGeneratorSequence();
/**
- * return the current tomeout for blocking calls
+ * Return the current timeout for blocking calls.
*
* @return the timeout in milliseconds
*/
@@ -86,7 +86,7 @@
* @return the lock
*/
Object getTransferLock();
-
+
/**
* Called periodically to flush any data in the batch buffer
*/
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java 2011-06-27 13:38:04 UTC (rev 10881)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/protocol/core/Packet.java 2011-06-27 13:39:55 UTC (rev 10882)
@@ -17,21 +17,22 @@
import org.hornetq.spi.core.protocol.RemotingConnection;
/**
- * A Packet represents a pcaket of data transmitted over a connection.
+ * A Packet represents a packet of data transmitted over a connection.
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/
public interface Packet
{
/**
- * This sets the channel id that should be used once the packet has been successfully decoded it is sent to the correct channel.
- *
+ * Sets the channel id that should be used once the packet has been successfully decoded it is
+ * sent to the correct channel.
+ *
* @param channelID the id of the channel to handle the packet
*/
void setChannelID(long channelID);
/**
- * returns the channel id of the channel that should handle this pcaket
+ * Returns the channel id of the channel that should handle this packet.
*
* @return the id of the channel
*/
@@ -81,6 +82,6 @@
* @return true if confirmation is required
*/
boolean isRequiresConfirmations();
-
+
boolean isAsyncExec();
}
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2011-06-27 13:38:04 UTC (rev 10881)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2011-06-27 13:39:55 UTC (rev 10882)
@@ -51,11 +51,9 @@
import org.hornetq.utils.ExecutorFactory;
/**
- * A RepplicationManagerImpl
- *
+ * A ReplicationManagerImpl
+ *
* @author <mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
- *
- *
*/
public class ReplicationManagerImpl implements ReplicationManager
{
Modified: trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java 2011-06-27 13:38:04 UTC (rev 10881)
+++ trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Acceptor.java 2011-06-27 13:39:55 UTC (rev 10882)
@@ -17,11 +17,12 @@
import org.hornetq.core.server.management.NotificationService;
/**
- * An Acceptor is used by the Remoting Service to allow clients to connect. It should take care of dispatching client requests
- * to the Remoting Service's Dispatcher.
- *
+ * An Acceptor is used by the Remoting Service to allow clients to connect. It should take care of
+ * dispatching client requests to the Remoting Service's Dispatcher.
+ *
* @author <a href="ataylor(a)redhat.com">Andy Taylor</a>
* @author <a href="tim.fox(a)jboss.com">Tim Fox</a>
+ * @see Connector
*/
public interface Acceptor extends HornetQComponent
{
Modified: trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java 2011-06-27 13:38:04 UTC (rev 10881)
+++ trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/Connector.java 2011-06-27 13:39:55 UTC (rev 10882)
@@ -20,17 +20,17 @@
public interface Connector
{
/**
- * starts the connector
+ * Starts the connector.
*/
void start();
/**
- * closes the connector
+ * Closes the connector.
*/
void close();
/**
- * returns true if the connector is started, oterwise false.
+ * Returns true if the connector is started, otherwise false.
*
* @return true if the connector is started
*/
@@ -39,9 +39,9 @@
/**
* Create and return a connection from this connector.
* <p/>
- * This method must NOT throw an exception if it fails to create the connection
- * (e.g. network is not available), in this case it MUST return null
- *
+ * This method must NOT throw an exception if it fails to create the connection (e.g. network is
+ * not available), in this case it MUST return {@code null}.
+ *
* @return The connection, or null if unable to create a connection (e.g. network is unavailable)
*/
Connection createConnection();
13 years, 8 months
JBoss hornetq SVN: r10881 - trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:38:04 -0400 (Mon, 27 Jun 2011)
New Revision: 10881
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java
Log:
Document class purpose.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java 2011-06-27 13:37:28 UTC (rev 10880)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeManager.java 2011-06-27 13:38:04 UTC (rev 10881)
@@ -13,25 +13,31 @@
package org.hornetq.core.server.impl;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.FAILING_BACK;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.LIVE;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.NOT_STARTED;
+import static org.hornetq.core.server.impl.InVMNodeManager.State.PAUSED;
+
+import java.util.concurrent.Semaphore;
+
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.server.NodeManager;
import org.hornetq.utils.UUIDGenerator;
-import java.util.concurrent.Semaphore;
-
-import static org.hornetq.core.server.impl.InVMNodeManager.State.*;
-
/**
- * @author <a href="mailto:andy.taylor@jboss.com">Andy Taylor</a>
- * Date: Oct 13, 2010
- * Time: 3:55:47 PM
+ * This is a _mock_ NodeManager and is used only in tests.
+ * <p>
+ * It allows writing tests without the need to spawn a new JVM.
+ *
+ * @author <a href="mailto:andy.taylor@jboss.com">Andy Taylor</a> Date: Oct 13, 2010 Time: 3:55:47
+ * PM
*/
public class InVMNodeManager extends NodeManager
{
- private Semaphore liveLock;
+ private final Semaphore liveLock;
- private Semaphore backupLock;
+ private final Semaphore backupLock;
public enum State {LIVE, PAUSED, FAILING_BACK, NOT_STARTED}
@@ -119,7 +125,7 @@
@Override
public boolean isAwaitingFailback() throws Exception
{
- return state == FAILING_BACK;
+ return state == FAILING_BACK;
}
@Override
13 years, 8 months
JBoss hornetq SVN: r10880 - trunk/etc.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:37:28 -0400 (Mon, 27 Jun 2011)
New Revision: 10880
Modified:
trunk/etc/org.eclipse.jdt.core.prefs
trunk/etc/org.eclipse.jdt.ui.prefs
Log:
Small Eclipse "Save actions" adjustments.
Modified: trunk/etc/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/etc/org.eclipse.jdt.core.prefs 2011-06-27 13:36:50 UTC (rev 10879)
+++ trunk/etc/org.eclipse.jdt.core.prefs 2011-06-27 13:37:28 UTC (rev 10880)
@@ -1,4 +1,4 @@
-#Fri Jun 17 11:54:22 CEST 2011
+#Thu Jun 23 17:28:54 CEST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -19,6 +19,7 @@
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82
@@ -87,7 +88,7 @@
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
Modified: trunk/etc/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/etc/org.eclipse.jdt.ui.prefs 2011-06-27 13:36:50 UTC (rev 10879)
+++ trunk/etc/org.eclipse.jdt.ui.prefs 2011-06-27 13:37:28 UTC (rev 10880)
@@ -1,4 +1,4 @@
-#Wed Jun 15 11:33:43 CEST 2011
+#Thu Jun 23 17:29:46 CEST 2011
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
@@ -82,7 +82,7 @@
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=true
sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=true
+sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
@@ -100,7 +100,7 @@
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
13 years, 8 months
JBoss hornetq SVN: r10879 - trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:36:50 -0400 (Mon, 27 Jun 2011)
New Revision: 10879
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
Log:
Remove unused import
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java 2011-06-27 13:32:44 UTC (rev 10878)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java 2011-06-27 13:36:50 UTC (rev 10879)
@@ -13,14 +13,13 @@
package org.hornetq.core.client.impl;
-import org.hornetq.api.core.HornetQException;
+import java.util.concurrent.Executor;
+
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.ServerLocator;
-import java.util.concurrent.Executor;
-
/**
* A ServerLocatorInternal
*
@@ -31,7 +30,7 @@
public interface ServerLocatorInternal extends ServerLocator
{
void start(Executor executor) throws Exception;
-
+
void factoryClosed(final ClientSessionFactory factory);
void setNodeID(String nodeID);
@@ -53,7 +52,7 @@
void setClusterTransportConfiguration(TransportConfiguration tc);
boolean isBackup();
-
+
void setBackup(boolean backup);
Topology getTopology();
13 years, 8 months
JBoss hornetq SVN: r10878 - branches.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-27 09:32:44 -0400 (Mon, 27 Jun 2011)
New Revision: 10878
Added:
branches/HORNETQ-720_Replication/
Log:
Create branch for HORNETQ-720 Atomic failover with replication
13 years, 8 months
JBoss hornetq SVN: r10877 - branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-21 18:47:40 -0400 (Tue, 21 Jun 2011)
New Revision: 10877
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
Log:
Adding a new test
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-21 22:43:06 UTC (rev 10876)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-21 22:47:40 UTC (rev 10877)
@@ -87,6 +87,68 @@
return false;
}
+ public void testSimpleWithBackup() throws Exception
+ {
+ // The backups
+ setupBackupServer(0, 3, isFileStorage(), true, isNetty());
+ setupBackupServer(1, 4, isFileStorage(), true, isNetty());
+ setupBackupServer(2, 5, isFileStorage(), true, isNetty());
+
+ // The lives
+ setupLiveServer(3, isFileStorage(), true, isNetty());
+ setupLiveServer(4, isFileStorage(), true, isNetty());
+ setupLiveServer(5, isFileStorage(), true, isNetty());
+
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 3, 4, 5);
+
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 4, 3, 5);
+
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 5, 3, 4);
+
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 4, 5);
+
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 3, 5);
+
+ setupClusterConnection("cluster2", "queues", false, 1, isNetty(), 2, 3, 4);
+
+
+ // startServers(3, 4, 5, 0, 1, 2);
+ startServers(0, 1, 2, 3, 4, 5);
+
+ Thread.sleep(1000);
+
+ log.info("");
+ for (int i = 0; i <= 5; i++)
+ {
+ log.info(servers[i].describe());
+ log.info(debugBindings(servers[i], servers[i].getConfiguration().getManagementNotificationAddress().toString()));
+ }
+ log.info("");
+
+ //stopServers(3);
+
+ Thread.sleep(1000);
+
+ log.info("");
+ for (int i = 0; i <= 5; i++)
+ {
+ log.info(servers[i].describe());
+ log.info(debugBindings(servers[i], servers[i].getConfiguration().getManagementNotificationAddress().toString()));
+ }
+ log.info("");
+
+
+
+// setupSessionFactory(0, isNetty());
+// setupSessionFactory(1, isNetty());
+// setupSessionFactory(2, isNetty());
+ // System.exit(-1);
+
+ stopServers(0, 1, 2, 3, 4, 5);
+
+ }
+
+
public void testSimple() throws Exception
{
setupServer(0, true, isNetty());
13 years, 8 months
JBoss hornetq SVN: r10876 - in branches/Branch_2_2_EAP_cluster_clean2: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-21 18:43:06 -0400 (Tue, 21 Jun 2011)
New Revision: 10876
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
Log:
Tweaks
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-06-21 21:57:15 UTC (rev 10875)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-06-21 22:43:06 UTC (rev 10876)
@@ -549,7 +549,7 @@
public void beforeReconnect(final HornetQException exception)
{
log.warn(name + "::Connection failed before reconnect ", exception);
- fail(true);
+ fail(false);
}
// Package protected ---------------------------------------------
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-21 21:57:15 UTC (rev 10875)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-21 22:43:06 UTC (rev 10876)
@@ -508,7 +508,7 @@
{
String ClusterTestBase = "receiving nodeUP for nodeID=";
log.debug(this + ClusterTestBase + nodeID +
- " connectionPair=" + connectorPair, new Exception ("trace"));
+ " connectionPair=" + connectorPair);
}
// discard notifications about ourselves unless its from our backup
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-21 21:57:15 UTC (rev 10875)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-21 22:43:06 UTC (rev 10876)
@@ -312,7 +312,7 @@
}
while (System.currentTimeMillis() - start < ClusterTestBase.WAIT_TIMEOUT);
- String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount + " (expecting " + expectedConsumerCount + ") "+
+ String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount + " (expecting " + expectedBindingCount + ") "+
", totConsumers = " +
totConsumers + " (expecting " + expectedConsumerCount + ")" +
")";
@@ -951,21 +951,32 @@
for (int i = 0; i < numMessages; i++)
{
- ConsumerHolder holder = consumers[consumerIDs[count]];
+ // We may use a negative number in some tests to ignore the consumer, case we know the server is down
+ if (consumerIDs[count] >= 0)
+ {
+ ConsumerHolder holder = consumers[consumerIDs[count]];
+
+ if (holder == null)
+ {
+ throw new IllegalArgumentException("No consumer at " + consumerIDs[i]);
+ }
+
+ ClientMessage message = holder.consumer.receive(WAIT_TIMEOUT);
+
+ message.acknowledge();
+
+ consumers[consumerIDs[count]].session.commit();
+
+ System.out.println("Msg: " + message);
+
+ Assert.assertNotNull("consumer " + consumerIDs[count] + " did not receive message " + i, message);
+
+ Assert.assertEquals("consumer " + consumerIDs[count] + " message " + i,
+ i,
+ message.getObjectProperty(ClusterTestBase.COUNT_PROP));
- if (holder == null)
- {
- throw new IllegalArgumentException("No consumer at " + consumerIDs[i]);
}
-
- ClientMessage message = holder.consumer.receive(WAIT_TIMEOUT);
-
- Assert.assertNotNull("consumer " + consumerIDs[count] + " did not receive message " + i, message);
-
- Assert.assertEquals("consumer " + consumerIDs[count] + " message " + i,
- i,
- message.getObjectProperty(ClusterTestBase.COUNT_PROP));
-
+
count++;
if (count == consumerIDs.length)
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-21 21:57:15 UTC (rev 10875)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-21 22:43:06 UTC (rev 10876)
@@ -140,7 +140,7 @@
waitForBindings(2, "queues.testaddress", 2, 2, false);
}
-
+
public void testSimpleRoundRobbin() throws Exception
{
setupServer(0, true, isNetty());
@@ -187,8 +187,11 @@
stopServers(2);
- Thread.sleep(5000);
+ waitForBindings(0, "queues.testaddress", 1, 1, false);
+ waitForBindings(1, "queues.testaddress", 1, 1, false);
+
+
send(0, "queues.testaddress", 100, true, null);
verifyReceiveRoundRobin(100, 0, 1);
@@ -220,6 +223,90 @@
}
+
+ public void testSimpleRoundRobbinNoFailure() throws Exception
+ {
+ setupServer(0, true, isNetty());
+ setupServer(1, true, isNetty());
+ setupServer(2, true, isNetty());
+
+ setupClusterConnection("cluster0", "queues", false, 1, -1, 1000, isNetty(), 0, 1, 2);
+ setupClusterConnection("cluster1", "queues", false, 1, -1, 1000, isNetty(), 1, 2, 0);
+ setupClusterConnection("cluster1", "queues", false, 1, -1, 1000, isNetty(), 2, 0, 1);
+
+ startServers(0, 1, 2);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ // Thread.sleep(1500);
+
+ createQueue(0, "queues.testaddress", "queue0", null, true);
+ // Thread.sleep(1500);
+ createQueue(1, "queues.testaddress", "queue0", null, true);
+ // Thread.sleep(1500);
+ createQueue(2, "queues.testaddress", "queue0", null, true);
+ // Thread.sleep(1500);
+
+ addConsumer(0, 0, "queue0", null);
+ // Thread.sleep(1500);
+ addConsumer(1, 1, "queue0", null);
+ // Thread.sleep(1500);
+ addConsumer(2, 2, "queue0", null);
+ // Thread.sleep(1500);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+
+ send(0, "queues.testaddress", 33, true, null);
+
+ verifyReceiveRoundRobin(33, 0, 1, 2);
+
+ Thread.sleep(1000);
+
+ // TODO: need to make sure the shutdown won't be send, what will affect the test
+ stopServers(2);
+//
+// Thread.sleep(5000);
+//
+// waitForBindings(0, "queues.testaddress", 2, 2, false);
+// waitForBindings(1, "queues.testaddress", 2, 2, false);
+
+
+ send(0, "queues.testaddress", 100, true, null);
+
+ verifyReceiveRoundRobin(100, 0, 1, -1);
+
+ sfs[2] = null;
+ consumers[2] = null;
+
+ startServers(2);
+
+ setupSessionFactory(2, isNetty());
+
+ addConsumer(2, 2, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+
+ verifyReceiveRoundRobin(100, -1, -1, 2);
+
+
+
+
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
13 years, 8 months
JBoss hornetq SVN: r10875 - tags/HornetQ_2_2_5_EAP_GA/src/config/common.
by do-not-reply@jboss.org
Author: jiwils
Date: 2011-06-21 17:57:15 -0400 (Tue, 21 Jun 2011)
New Revision: 10875
Modified:
tags/HornetQ_2_2_5_EAP_GA/src/config/common/hornetq-version.properties
Log:
Update version info to 2.2.5.
Modified: tags/HornetQ_2_2_5_EAP_GA/src/config/common/hornetq-version.properties
===================================================================
--- tags/HornetQ_2_2_5_EAP_GA/src/config/common/hornetq-version.properties 2011-06-21 21:49:58 UTC (rev 10874)
+++ tags/HornetQ_2_2_5_EAP_GA/src/config/common/hornetq-version.properties 2011-06-21 21:57:15 UTC (rev 10875)
@@ -1,7 +1,7 @@
-hornetq.version.versionName=HQ_2_2_4_GA_EAP
+hornetq.version.versionName=HQ_2_2_5_GA_EAP
hornetq.version.majorVersion=2
hornetq.version.minorVersion=2
-hornetq.version.microVersion=3
+hornetq.version.microVersion=5
hornetq.version.incrementingVersion=121
hornetq.version.versionSuffix=GA
hornetq.version.versionTag=GA
13 years, 8 months
JBoss hornetq SVN: r10874 - tags.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-21 17:49:58 -0400 (Tue, 21 Jun 2011)
New Revision: 10874
Added:
tags/HornetQ_2_2_5_EAP_GA/
Log:
Tagging HorneQ 2.2.5 EAP GA.
13 years, 8 months