JBoss hornetq SVN: r11106 - in branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests: integration/cluster/distribution and 3 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-03 17:18:53 -0400 (Wed, 03 Aug 2011)
New Revision: 11106
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterHeadersRemovedTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/AutoGroupingTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/GroupIDTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/persistence/JMSDynamicConfigTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/JMSTestBase.java
Log:
Removing Netty from JMS Tests
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -64,7 +64,7 @@
{
clearData();
super.setUp();
-
+
topic1 = createTopic("topic1");
// Paging Setting
@@ -77,6 +77,7 @@
@Override
protected void tearDown() throws Exception
{
+ log.info("#tearDown");
topic1 = null;
super.tearDown();
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterHeadersRemovedTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterHeadersRemovedTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterHeadersRemovedTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -1,4 +1,4 @@
-/*
+ /*
* Copyright 2009 Red Hat, Inc.
* Red Hat licenses this file to you under the Apache License, version
* 2.0 (the "License"); you may not use this file except in compliance
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/AutoGroupingTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/AutoGroupingTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/AutoGroupingTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -19,7 +19,6 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.api.jms.JMSFactoryType;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.jms.client.HornetQJMSConnectionFactory;
/**
@@ -35,7 +34,7 @@
@Override
protected ConnectionFactory getCF() throws Exception
{
- HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
cf.setAutoGroup(true);
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/GroupIDTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/GroupIDTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/GroupIDTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -19,7 +19,6 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.api.jms.JMSFactoryType;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.jms.client.HornetQJMSConnectionFactory;
/**
@@ -35,7 +34,7 @@
@Override
protected ConnectionFactory getCF() throws Exception
{
- HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
cf.setGroupID("wibble");
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/jms/client/SessionClosedOnRemotingConnectionFailureTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -27,13 +27,11 @@
import junit.framework.Assert;
import org.hornetq.api.core.HornetQException;
-import org.hornetq.api.core.Pair;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.logging.Logger;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.jms.client.HornetQSession;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.util.JMSTestBase;
@@ -63,7 +61,7 @@
public void testSessionClosedOnRemotingConnectionFailure() throws Exception
{
List<TransportConfiguration> connectorConfigs = new ArrayList<TransportConfiguration>();
- connectorConfigs.add(new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ connectorConfigs.add(new TransportConfiguration(INVM_CONNECTOR_FACTORY));
jmsServer.createConnectionFactory("cffoo",
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/persistence/JMSDynamicConfigTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/persistence/JMSDynamicConfigTest.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/persistence/JMSDynamicConfigTest.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -52,7 +52,7 @@
{
ArrayList<String> connectors = new ArrayList<String>();
- connectors.add("netty");
+ connectors.add("invm");
ConnectionFactoryConfiguration cfg = new ConnectionFactoryConfigurationImpl("tst", false, connectors, "tt");
jmsServer.createConnectionFactory(true, cfg, "tst");
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/JMSTestBase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/JMSTestBase.java 2011-08-03 20:52:33 UTC (rev 11105)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/JMSTestBase.java 2011-08-03 21:18:53 UTC (rev 11106)
@@ -27,8 +27,6 @@
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
@@ -110,8 +108,8 @@
Configuration conf = createDefaultConfig(false);
- conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
- conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ conf.getAcceptorConfigurations().add(new TransportConfiguration(INVM_ACCEPTOR_FACTORY));
+ conf.getConnectorConfigurations().put("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
server = HornetQServers.newHornetQServer(conf, mbeanServer, usePersistence());
@@ -181,7 +179,7 @@
protected void registerConnectionFactory() throws Exception
{
List<TransportConfiguration> connectorConfigs = new ArrayList<TransportConfiguration>();
- connectorConfigs.add(new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ connectorConfigs.add(new TransportConfiguration(INVM_CONNECTOR_FACTORY));
createCF(connectorConfigs, "/cf");
13 years, 5 months
JBoss hornetq SVN: r11105 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-03 16:52:33 -0400 (Wed, 03 Aug 2011)
New Revision: 11105
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
tweak
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-03 20:44:02 UTC (rev 11104)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-03 20:52:33 UTC (rev 11105)
@@ -1598,8 +1598,12 @@
}
try
{
- factory.connect(1, false);
- return factory;
+ ClientSessionFactoryInternal factoryToUse = factory;
+ if (factoryToUse != null)
+ {
+ factory.connect(1, false);
+ }
+ return factoryToUse;
}
catch (HornetQException e)
{
13 years, 5 months
JBoss hornetq SVN: r11104 - in branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core: server/cluster/impl and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-03 16:44:02 -0400 (Wed, 03 Aug 2011)
New Revision: 11104
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
test fixes
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-08-03 20:06:41 UTC (rev 11103)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-08-03 20:44:02 UTC (rev 11104)
@@ -118,7 +118,6 @@
{
public void nodeUP(String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last)
{
- Logger.getLogger(this.getClass()).info("ZZZ send nodeDown on " + this);
channel0.send(new ClusterTopologyChangeMessage(nodeID, connectorPair, last));
}
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-08-03 20:06:41 UTC (rev 11103)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-08-03 20:44:02 UTC (rev 11104)
@@ -383,14 +383,10 @@
{
public void run()
{
- synchronized (ClusterConnectionImpl.this)
+ if (serverLocator != null)
{
- if (serverLocator != null)
- {
- serverLocator.removeClusterTopologyListener(ClusterConnectionImpl.this);
- serverLocator.close();
- serverLocator = null;
- }
+ serverLocator.close();
+ serverLocator = null;
}
}
@@ -549,55 +545,55 @@
final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
final boolean last)
{
+ if (log.isDebugEnabled())
+ {
+ String ClusterTestBase = "receiving nodeUP for nodeID=";
+ log.debug(this + ClusterTestBase + nodeID + " connectionPair=" + connectorPair);
+ }
+ // discard notifications about ourselves unless its from our backup
- // we propagate the node notifications to all cluster topology listeners
- server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
-
- synchronized (this)
+ if (nodeID.equals(nodeUUID.toString()))
{
- if (serverLocator == null)
+ if (connectorPair.b != null)
{
- log.debug("ClusterConnection nodeID=" + nodeID + " has already been stopped, ignoring call");
- return;
+ server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
}
+ return;
+ }
- if (log.isDebugEnabled())
- {
- String ClusterTestBase = "receiving nodeUP for nodeID=";
- log.debug(this + ClusterTestBase + nodeID + " connectionPair=" + connectorPair);
- }
- // discard notifications about ourselves unless its from our backup
+ // we propagate the node notifications to all cluster topology listeners
+ server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
- if (nodeID.equals(nodeUUID.toString()))
- {
- if (connectorPair.b != null)
- {
- server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
- }
- return;
- }
+ // if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
+ if (allowDirectConnectionsOnly && !allowableConnections.contains(connectorPair.a))
+ {
+ return;
+ }
- // if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
- if (allowDirectConnectionsOnly && !allowableConnections.contains(connectorPair.a))
+ // FIXME required to prevent cluster connections w/o discovery group
+ // and empty static connectors to create bridges... ulgy!
+ if (serverLocator == null)
+ {
+ log.warn("ServerLocator==null FixME!!!!!");
+ return;
+ }
+ /*we dont create bridges to backups*/
+ if (connectorPair.a == null)
+ {
+ if (isTrace)
{
- return;
+ log.trace(this + " ignoring call with nodeID=" +
+ nodeID +
+ ", connectorPair=" +
+ connectorPair +
+ ", last=" +
+ last);
}
+ return;
+ }
- /*we dont create bridges to backups*/
- if (connectorPair.a == null)
- {
- if (isTrace)
- {
- log.trace(this + " ignoring call with nodeID=" +
- nodeID +
- ", connectorPair=" +
- connectorPair +
- ", last=" +
- last);
- }
- return;
- }
-
+ synchronized (records)
+ {
try
{
MessageFlowRecord record = records.get(nodeID);
@@ -645,22 +641,17 @@
}
catch (Exception e)
{
- log.error(this + "::Failed to update topology", e);
+ log.error("Failed to update topology", e);
}
}
}
- private synchronized void createNewRecord(final String targetNodeID,
- final TransportConfiguration connector,
- final SimpleString queueName,
- final Queue queue,
- final boolean start) throws Exception
+ private void createNewRecord(final String targetNodeID,
+ final TransportConfiguration connector,
+ final SimpleString queueName,
+ final Queue queue,
+ final boolean start) throws Exception
{
- if (serverLocator != null)
- {
- return;
- }
-
MessageFlowRecordImpl record = new MessageFlowRecordImpl(targetNodeID, connector, queueName, queue);
Bridge bridge = createClusteredBridge(record);
@@ -690,7 +681,8 @@
final ServerLocatorInternal targetLocator = new ServerLocatorImpl(this.clusterManagerTopology,
false,
- server.getThreadPool(), server.getScheduledPool(),
+ server.getThreadPool(),
+ server.getScheduledPool(),
record.getConnector());
targetLocator.setReconnectAttempts(0);
@@ -1307,7 +1299,11 @@
{
log.debug(ClusterConnectionImpl.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs));
}
- return new ServerLocatorImpl(clusterManagerTopology, true, server.getThreadPool(), server.getScheduledPool(), tcConfigs);
+ return new ServerLocatorImpl(clusterManagerTopology,
+ true,
+ server.getThreadPool(),
+ server.getScheduledPool(),
+ tcConfigs);
}
else
{
@@ -1337,7 +1333,11 @@
public ServerLocatorInternal createServerLocator()
{
- return new ServerLocatorImpl(clusterManagerTopology, true, server.getThreadPool(), server.getScheduledPool(), dg);
+ return new ServerLocatorImpl(clusterManagerTopology,
+ true,
+ server.getThreadPool(),
+ server.getScheduledPool(),
+ dg);
}
}
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-08-03 20:06:41 UTC (rev 11103)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-08-03 20:44:02 UTC (rev 11104)
@@ -24,6 +24,7 @@
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@@ -426,7 +427,13 @@
public void deliverAsync()
{
- getExecutor().execute(deliverRunner);
+ try
+ {
+ getExecutor().execute(deliverRunner);
+ }
+ catch (RejectedExecutionException ignored)
+ {
+ }
}
public void close() throws Exception
13 years, 5 months
JBoss hornetq SVN: r11103 - in branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster: restart and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-03 16:06:41 -0400 (Wed, 03 Aug 2011)
New Revision: 11103
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/SimpleSymmetricClusterTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/restart/ClusterRestartTest.java
Log:
tweaks on tests
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-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -265,8 +265,6 @@
{
if (nodes == topology.getMembers().size())
{
-
- log.info("ZZZ III look up for topology on " + topology + " size = " + topology.getMembers().size());
return;
}
@@ -274,7 +272,7 @@
}
while (System.currentTimeMillis() - start < timeout);
- String msg = "ZZZ Timed out waiting for cluster topology of " + nodes + " (received " + topology.getMembers().size() + ") topology = " + topology + ")\n Current topology:" + topology.describe();
+ String msg = "Timed out waiting for cluster topology of " + nodes + " (received " + topology.getMembers().size() + ") topology = " + topology + ")\n Current topology:" + topology.describe();
ClusterTestBase.log.error(msg);
@@ -2052,6 +2050,8 @@
{
try
{
+ // We need to wait a
+ Thread.sleep(500);
ClusterTestBase.log.info("stopping server " + node);
servers[node].stop();
ClusterTestBase.log.info("server " + node + " stopped");
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-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -137,11 +137,6 @@
-// setupSessionFactory(0, isNetty());
-// setupSessionFactory(1, isNetty());
-// setupSessionFactory(2, isNetty());
- // System.exit(-1);
-
stopServers(0, 1, 2, 3, 4, 5);
}
@@ -294,7 +289,9 @@
setupSessionFactory(1, isNetty());
setupSessionFactory(2, isNetty());
- // Thread.sleep(1500);
+ // Need to wait some time so the bridges and
+ // connectors had time to connect properly between the nodes
+ Thread.sleep(1000);
createQueue(0, "queues.testaddress", "queue0", null, true);
// Thread.sleep(1500);
@@ -321,7 +318,7 @@
send(0, "queues.testaddress", 33, true, null);
verifyReceiveRoundRobin(33, 0, 1, 2);
-
+
stopServers(2);
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2011-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -59,6 +59,9 @@
setupCluster();
startServers();
+
+ // Waiting some time to the servers to get connected
+ Thread.sleep(1000);
setupSessionFactory(0, isNetty());
setupSessionFactory(1, isNetty());
@@ -115,6 +118,9 @@
stopServers(0, 1, 2, 3, 4);
startServers();
+
+ // Wait some time so the servers are connected to each other
+ Thread.sleep(2000);
setupSessionFactory(0, isNetty());
setupSessionFactory(1, isNetty());
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java 2011-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -270,6 +270,8 @@
setupCluster();
startServers();
+
+ Thread.sleep(1000);
SymmetricClusterWithBackupTest.log.info("setup session factories: ");
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/TwoWayTwoNodeClusterTest.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -130,23 +130,30 @@
public void testRestartTest() throws Throwable
{
- startServers(0, 1);
- waitForTopology(servers[0], 2);
-
- log.info("ZZZ Server 0 " + servers[0].describe());
+ String name = Thread.currentThread().getName();
+ try
+ {
+ Thread.currentThread().setName("ThreadOnTestRestartTest");
+ startServers(0, 1);
+ waitForTopology(servers[0], 2);
+ waitForTopology(servers[1], 2);
- for (int i = 0; i < 5; i++)
+ for (int i = 0; i < 5; i++)
+ {
+ log.info("Sleep #test " + i);
+ Thread.sleep(500);
+ log.info("#stop #test #" + i);
+ stopServers(1);
+ waitForTopology(servers[0], 1, 2000);
+ log.info("#start #test #" + i);
+ startServers(1);
+ waitForTopology(servers[0], 2, 2000);
+ waitForTopology(servers[1], 2, 2000);
+ }
+ }
+ finally
{
- log.info("#stop #test #" + i);
- Thread.sleep(500);
- stopServers(1);
- waitForTopology(servers[0], 1, 2000);
- log.info("#start #test #" + i);
- Thread.sleep(500);
- startServers(1);
- Thread.sleep(500);
- waitForTopology(servers[0], 2, 2000);
- waitForTopology(servers[1], 2, 2000);
+ Thread.currentThread().setName(name);
}
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/restart/ClusterRestartTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/restart/ClusterRestartTest.java 2011-08-03 19:53:17 UTC (rev 11102)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/restart/ClusterRestartTest.java 2011-08-03 20:06:41 UTC (rev 11103)
@@ -37,7 +37,11 @@
setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0);
startServers(0, 1);
+
+ // Waiting some time to the servers to connect to each other
+ Thread.sleep(1000);
+
System.out.println("server 0 = " + getServer(0).getNodeID());
System.out.println("server 1 = " + getServer(1).getNodeID());
@@ -76,8 +80,8 @@
log.info("stopping******************************************************");
stopServers(0);
- log.info("stopped, waiting 2 seconds************************************");
- Thread.sleep(2000);
+ // Waiting some time after stopped
+ Thread.sleep(1000);
startServers(0);
waitForBindings(0, "queues.testaddress", 1, 1, true);
@@ -115,6 +119,10 @@
setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0);
startServers(0, 1);
+
+
+ // Waiting some time to the servers to connect to each other
+ Thread.sleep(1000);
System.out.println("server 0 = " + getServer(0).getNodeID());
System.out.println("server 1 = " + getServer(1).getNodeID());
13 years, 5 months
JBoss hornetq SVN: r11102 - in branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq: core/protocol/core/impl and 4 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-03 15:53:17 -0400 (Wed, 03 Aug 2011)
New Revision: 11102
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/HornetQServer.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/utils/HornetQThreadFactory.java
Log:
tweaks on code (fixing tests)
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -21,8 +21,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@@ -117,7 +117,7 @@
private final ExecutorFactory orderedExecutorFactory;
- private final ExecutorService threadPool;
+ private final Executor threadPool;
private final ScheduledExecutorService scheduledThreadPool;
@@ -168,7 +168,7 @@
final double retryIntervalMultiplier,
final long maxRetryInterval,
final int reconnectAttempts,
- final ExecutorService threadPool,
+ final Executor threadPool,
final ScheduledExecutorService scheduledThreadPool,
final List<Interceptor> interceptors)
{
@@ -1402,7 +1402,7 @@
if (log.isTraceEnabled())
{
- log.trace("XXX Disconnect being called on client:" + msg, new Exception ("trace"));
+ log.trace("ZZZ Disconnect being called on client:" + msg + " server locator = " + serverLocator, new Exception ("trace"));
}
closeExecutor.execute(new Runnable()
@@ -1414,7 +1414,7 @@
SimpleString nodeID = msg.getNodeID();
if (log.isTraceEnabled())
{
- log.trace("XXX YYY notifyDown nodeID=" + msg.getNodeID() + " on serverLocator=" + serverLocator);
+ log.trace("ZZZ notifyDown nodeID=" + msg.getNodeID() + " on serverLocator=" + serverLocator + " csf created at ", ClientSessionFactoryImpl.this.e);
}
if (nodeID != null)
{
@@ -1443,11 +1443,11 @@
{
if (isDebug)
{
- log.debug("Node " + topMessage.getNodeID() +
+ log.debug("ZZZ Node " + topMessage.getNodeID() +
" going up, connector = " +
topMessage.getPair() +
", isLast=" +
- topMessage.isLast());
+ topMessage.isLast() + " csf created at\nserverLocator=" + serverLocator, ClientSessionFactoryImpl.this.e);
}
serverLocator.notifyNodeUp(topMessage.getNodeID(), topMessage.getPair(), topMessage.isLast());
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -84,6 +84,9 @@
private boolean receivedTopology;
private boolean compressLargeMessage;
+
+ // if the system should shutdown the pool when shutting down
+ private transient boolean shutdownPool;
private ExecutorService threadPool;
@@ -249,6 +252,11 @@
private void setThreadPools()
{
+ if (threadPool != null)
+ {
+ return;
+ }
+ else
if (useGlobalPools)
{
threadPool = getGlobalThreadPool();
@@ -257,6 +265,8 @@
}
else
{
+ this.shutdownPool = true;
+
ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-factory-threads-" + System.identityHashCode(this),
true,
getThisClassLoader());
@@ -359,12 +369,19 @@
private ServerLocatorImpl(final Topology topology,
final boolean useHA,
+ final ExecutorService threadPool,
+ final ScheduledExecutorService scheduledExecutor,
final DiscoveryGroupConfiguration discoveryGroupConfiguration,
final TransportConfiguration[] transportConfigs)
{
e.fillInStackTrace();
+ this.scheduledThreadPool = scheduledExecutor;
+
+ this.threadPool = threadPool;
+
this.topology = topology;
+
this.ha = useHA;
this.discoveryGroupConfiguration = discoveryGroupConfiguration;
@@ -442,7 +459,7 @@
*/
public ServerLocatorImpl(final boolean useHA, final DiscoveryGroupConfiguration groupConfiguration)
{
- this(new Topology(null), useHA, groupConfiguration, null);
+ this(new Topology(null), useHA, null, null, groupConfiguration, null);
topology.setOwner(this);
}
@@ -453,7 +470,7 @@
*/
public ServerLocatorImpl(final boolean useHA, final TransportConfiguration... transportConfigs)
{
- this(new Topology(null), useHA, null, transportConfigs);
+ this(new Topology(null), useHA, null, null, null, transportConfigs);
topology.setOwner(this);
}
@@ -463,9 +480,10 @@
* @param discoveryAddress
* @param discoveryPort
*/
- public ServerLocatorImpl(final Topology topology, final boolean useHA, final DiscoveryGroupConfiguration groupConfiguration)
+ public ServerLocatorImpl(final Topology topology, final boolean useHA, final ExecutorService threadPool, final ScheduledExecutorService scheduledExecutor, final DiscoveryGroupConfiguration groupConfiguration)
{
- this(topology, useHA, groupConfiguration, null);
+ this(topology, useHA, threadPool, scheduledExecutor, groupConfiguration, null);
+
}
/**
@@ -473,9 +491,9 @@
*
* @param transportConfigs
*/
- public ServerLocatorImpl(final Topology topology, final boolean useHA, final TransportConfiguration... transportConfigs)
+ public ServerLocatorImpl(final Topology topology, final boolean useHA, final ExecutorService threadPool, final ScheduledExecutorService scheduledExecutor, final TransportConfiguration... transportConfigs)
{
- this(topology, useHA, null, transportConfigs);
+ this(topology, useHA, threadPool, scheduledExecutor, null, transportConfigs);
}
private TransportConfiguration selectConnector()
@@ -1163,7 +1181,7 @@
factories.clear();
- if (!useGlobalPools)
+ if (shutdownPool)
{
if (threadPool != null)
{
@@ -1264,7 +1282,7 @@
TopologyMember actMember = topology.getMember(nodeID);
- if (actMember.getConnector().a != null && actMember.getConnector().b != null)
+ if (actMember != null && actMember.getConnector().a != null && actMember.getConnector().b != null)
{
for (ClientSessionFactory factory : factories)
{
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/Topology.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -55,7 +55,7 @@
public Topology(final Object owner)
{
this.owner = owner;
- Topology.log.debug("ZZZ III Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE",
+ Topology.log.debug("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE",
new Exception("trace")); // Delete this line
}
@@ -115,7 +115,7 @@
replaced = true;
if (Topology.log.isDebugEnabled())
{
- Topology.log.debug("ZZZ " + this +
+ Topology.log.debug("Add " + this +
" MEMBER WAS NULL, Add member nodeId=" +
nodeId +
" member = " +
@@ -158,7 +158,7 @@
if (Topology.log.isDebugEnabled())
{
- Topology.log.debug("ZZZ " + this +
+ Topology.log.debug(this +
" Add member nodeId=" +
nodeId +
" member = " +
@@ -178,10 +178,17 @@
{
if (Topology.log.isTraceEnabled())
{
- Topology.log.trace("XXX ZZZ " + this + " informing " + listener + " about node up = " + nodeId);
+ Topology.log.trace(this + " informing " + listener + " about node up = " + nodeId);
}
- listener.nodeUP(nodeId, member.getConnector(), last);
+ try
+ {
+ listener.nodeUP(nodeId, member.getConnector(), last);
+ }
+ catch (Throwable e)
+ {
+ log.warn (e.getMessage(), e);
+ }
}
}
@@ -209,7 +216,19 @@
{
member = topology.remove(nodeId);
}
+
+ if (Topology.log.isDebugEnabled())
+ {
+ Topology.log.debug("ZZZ removeMember " + this +
+ " removing nodeID=" +
+ nodeId +
+ ", result=" +
+ member +
+ ", size = " +
+ topology.size(), new Exception("trace"));
+ }
+
if (member != null)
{
ArrayList<ClusterTopologyListener> copy = copyListeners();
@@ -218,23 +237,11 @@
{
if (Topology.log.isTraceEnabled())
{
- Topology.log.trace("XXX ZZZ " + this + " informing " + listener + " about node down = " + nodeId);
+ Topology.log.trace(this + " informing " + listener + " about node down = " + nodeId);
}
listener.nodeDown(nodeId);
}
}
-
- if (Topology.log.isDebugEnabled())
- {
- Topology.log.debug("ZZZ " + this +
- " removing nodeID=" +
- nodeId +
- ", result=" +
- member +
- ", size = " +
- topology.size(), new Exception("trace"));
- }
-
return member != null;
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -118,6 +118,7 @@
{
public void nodeUP(String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last)
{
+ Logger.getLogger(this.getClass()).info("ZZZ send nodeDown on " + this);
channel0.send(new ClusterTopologyChangeMessage(nodeID, connectorPair, last));
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/HornetQServer.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/HornetQServer.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/HornetQServer.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -15,6 +15,7 @@
import java.util.List;
import java.util.Set;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import javax.management.MBeanServer;
@@ -152,6 +153,8 @@
ScheduledExecutorService getScheduledPool();
+ ExecutorService getThreadPool();
+
ExecutorFactory getExecutorFactory();
void setGroupingHandler(GroupingHandler groupingHandler);
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-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -71,13 +71,13 @@
public class ClusterConnectionImpl implements ClusterConnection
{
private static final Logger log = Logger.getLogger(ClusterConnectionImpl.class);
-
+
private static final boolean isTrace = log.isTraceEnabled();
private final ExecutorFactory executorFactory;
-
+
private final Topology clusterManagerTopology;
-
+
private final Executor executor;
private final HornetQServer server;
@@ -91,15 +91,15 @@
private final SimpleString address;
private final long clientFailureCheckPeriod;
-
+
private final long connectionTTL;
-
+
private final long retryInterval;
-
+
private final double retryIntervalMultiplier;
-
+
private final long maxRetryInterval;
-
+
private final int reconnectAttempts;
private final boolean useDuplicateDetection;
@@ -125,15 +125,15 @@
private final ClusterConnector clusterConnector;
private ServerLocatorInternal serverLocator;
-
+
private final TransportConfiguration connector;
private final boolean allowDirectConnectionsOnly;
private final Set<TransportConfiguration> allowableConnections = new HashSet<TransportConfiguration>();
-
+
private final ClusterManagerImpl manager;
-
+
public ClusterConnectionImpl(final ClusterManagerImpl manager,
final Topology clusterManagerTopology,
final TransportConfiguration[] tcConfigs,
@@ -176,15 +176,15 @@
this.address = address;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
-
+
this.connectionTTL = connectionTTL;
-
+
this.retryInterval = retryInterval;
-
+
this.retryIntervalMultiplier = retryIntervalMultiplier;
-
+
this.maxRetryInterval = maxRetryInterval;
-
+
this.reconnectAttempts = reconnectAttempts;
this.useDuplicateDetection = useDuplicateDetection;
@@ -192,7 +192,7 @@
this.routeWhenNoConsumers = routeWhenNoConsumers;
this.executorFactory = executorFactory;
-
+
this.executor = executorFactory.getExecutor();
this.server = server;
@@ -212,9 +212,9 @@
this.clusterPassword = clusterPassword;
this.allowDirectConnectionsOnly = allowDirectConnectionsOnly;
-
+
this.manager = manager;
-
+
this.clusterManagerTopology = clusterManagerTopology;
clusterConnector = new StaticClusterConnector(tcConfigs);
@@ -223,7 +223,7 @@
{
// a cluster connection will connect to other nodes only if they are directly connected
// through a static list of connectors or broadcasting using UDP.
- if(allowDirectConnectionsOnly)
+ if (allowDirectConnectionsOnly)
{
allowableConnections.addAll(Arrays.asList(tcConfigs));
}
@@ -237,12 +237,12 @@
final TransportConfiguration connector,
final SimpleString name,
final SimpleString address,
- final long clientFailureCheckPeriod,
- final long connectionTTL,
- final long retryInterval,
- final double retryIntervalMultiplier,
- final long maxRetryInterval,
- final int reconnectAttempts,
+ final long clientFailureCheckPeriod,
+ final long connectionTTL,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final long maxRetryInterval,
+ final int reconnectAttempts,
final boolean useDuplicateDetection,
final boolean routeWhenNoConsumers,
final int confirmationWindowSize,
@@ -273,15 +273,15 @@
this.address = address;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
-
+
this.connectionTTL = connectionTTL;
-
+
this.retryInterval = retryInterval;
-
+
this.retryIntervalMultiplier = retryIntervalMultiplier;
-
+
this.maxRetryInterval = maxRetryInterval;
-
+
this.reconnectAttempts = reconnectAttempts;
this.useDuplicateDetection = useDuplicateDetection;
@@ -289,7 +289,7 @@
this.routeWhenNoConsumers = routeWhenNoConsumers;
this.executorFactory = executorFactory;
-
+
this.executor = executorFactory.getExecutor();
this.server = server;
@@ -311,9 +311,9 @@
this.allowDirectConnectionsOnly = allowDirectConnectionsOnly;
clusterConnector = new DiscoveryClusterConnector(dg);
-
+
this.manager = manager;
-
+
this.clusterManagerTopology = clusterManagerTopology;
}
@@ -325,13 +325,12 @@
}
started = true;
-
- if(!backup)
+
+ if (!backup)
{
activate();
}
-
}
public void stop() throws Exception
@@ -340,14 +339,23 @@
{
return;
}
+
+ if (log.isDebugEnabled())
+ {
+ log.debug(this + "::stopping ClusterConnection");
+ }
if (serverLocator != null)
{
serverLocator.removeClusterTopologyListener(this);
}
-
- log.debug("Cluster connection being stopped for node" + nodeUUID + ", server = " + this.server + " serverLocator = " + serverLocator );
+ log.debug("Cluster connection being stopped for node" + nodeUUID +
+ ", server = " +
+ this.server +
+ " serverLocator = " +
+ serverLocator);
+
synchronized (this)
{
for (MessageFlowRecord record : records.values())
@@ -370,14 +378,19 @@
props);
managementService.sendNotification(notification);
}
-
- executor.execute(new Runnable(){
+
+ executor.execute(new Runnable()
+ {
public void run()
{
- if(serverLocator != null)
+ synchronized (ClusterConnectionImpl.this)
{
- serverLocator.close();
- serverLocator = null;
+ if (serverLocator != null)
+ {
+ serverLocator.removeClusterTopologyListener(ClusterConnectionImpl.this);
+ serverLocator.close();
+ serverLocator = null;
+ }
}
}
@@ -401,7 +414,7 @@
{
return nodeUUID.toString();
}
-
+
public HornetQServer getServer()
{
return server;
@@ -429,7 +442,7 @@
{
return;
}
-
+
if (log.isDebugEnabled())
{
log.debug("Activating cluster connection nodeID=" + nodeUUID + " for server=" + this.server);
@@ -439,7 +452,6 @@
serverLocator = clusterConnector.createServerLocator();
-
if (serverLocator != null)
{
serverLocator.setNodeID(nodeUUID.toString());
@@ -451,17 +463,17 @@
serverLocator.setClusterTransportConfiguration(connector);
serverLocator.setBackup(server.getConfiguration().isBackup());
serverLocator.setInitialConnectAttempts(-1);
-
+
serverLocator.setClientFailureCheckPeriod(clientFailureCheckPeriod);
serverLocator.setConnectionTTL(connectionTTL);
if (serverLocator.getConfirmationWindowSize() < 0)
{
- // We can't have confirmationSize = -1 on the cluster Bridge
- // Otherwise we won't have confirmation working
+ // We can't have confirmationSize = -1 on the cluster Bridge
+ // Otherwise we won't have confirmation working
serverLocator.setConfirmationWindowSize(0);
}
-
+
if (!useDuplicateDetection)
{
log.debug("DuplicateDetection is disabled, sending clustered messages blocked");
@@ -470,7 +482,7 @@
serverLocator.setBlockOnDurableSend(!useDuplicateDetection);
serverLocator.setBlockOnNonDurableSend(!useDuplicateDetection);
- if(retryInterval > 0)
+ if (retryInterval > 0)
{
this.serverLocator.setRetryInterval(retryInterval);
}
@@ -491,7 +503,7 @@
managementService.sendNotification(notification);
}
}
-
+
public TransportConfiguration getConnector()
{
return connector;
@@ -509,9 +521,9 @@
{
return;
}
-
- //Remove the flow record for that node
-
+
+ // Remove the flow record for that node
+
MessageFlowRecord record = records.remove(nodeID);
if (record != null)
@@ -528,62 +540,64 @@
{
log.error("Failed to close flow record", e);
}
-
+
server.getClusterManager().notifyNodeDown(nodeID);
}
}
-
public void nodeUP(final String nodeID,
- final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
- final boolean last)
+ final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
+ final boolean last)
{
- if (log.isDebugEnabled())
- {
- String ClusterTestBase = "receiving nodeUP for nodeID=";
- log.debug(this + ClusterTestBase + nodeID +
- " connectionPair=" + connectorPair);
- }
- // discard notifications about ourselves unless its from our backup
- if (nodeID.equals(nodeUUID.toString()))
+ // we propagate the node notifications to all cluster topology listeners
+ server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
+
+ synchronized (this)
{
- if(connectorPair.b != null)
+ if (serverLocator == null)
{
- server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
+ log.debug("ClusterConnection nodeID=" + nodeID + " has already been stopped, ignoring call");
+ return;
}
- return;
- }
- // we propagate the node notifications to all cluster topology listeners
- server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
+ if (log.isDebugEnabled())
+ {
+ String ClusterTestBase = "receiving nodeUP for nodeID=";
+ log.debug(this + ClusterTestBase + nodeID + " connectionPair=" + connectorPair);
+ }
+ // discard notifications about ourselves unless its from our backup
- // if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
- if (allowDirectConnectionsOnly && !allowableConnections.contains(connectorPair.a))
- {
- return;
- }
+ if (nodeID.equals(nodeUUID.toString()))
+ {
+ if (connectorPair.b != null)
+ {
+ server.getClusterManager().notifyNodeUp(nodeID, connectorPair, last, false);
+ }
+ return;
+ }
- // FIXME required to prevent cluster connections w/o discovery group
- // and empty static connectors to create bridges... ulgy!
- if (serverLocator == null)
- {
- log.warn("ServerLocator==null FixME!!!!!");
- return;
- }
- /*we dont create bridges to backups*/
- if(connectorPair.a == null)
- {
- if (isTrace)
+ // if the node is more than 1 hop away, we do not create a bridge for direct cluster connection
+ if (allowDirectConnectionsOnly && !allowableConnections.contains(connectorPair.a))
{
- log.trace(this + " ignoring call with nodeID=" + nodeID +
- ", connectorPair=" + connectorPair + ", last=" + last);
+ return;
}
- return;
- }
- synchronized (records)
- {
+ /*we dont create bridges to backups*/
+ if (connectorPair.a == null)
+ {
+ if (isTrace)
+ {
+ log.trace(this + " ignoring call with nodeID=" +
+ nodeID +
+ ", connectorPair=" +
+ connectorPair +
+ ", last=" +
+ last);
+ }
+ return;
+ }
+
try
{
MessageFlowRecord record = records.get(nodeID);
@@ -620,32 +634,42 @@
{
if (isTrace)
{
- log.trace ("XXX " + this + " ignored nodeUp record for " + connectorPair + " on nodeID=" + nodeID + " as the record already existed");
+ log.trace("XXX " + this +
+ " ignored nodeUp record for " +
+ connectorPair +
+ " on nodeID=" +
+ nodeID +
+ " as the record already existed");
}
}
}
catch (Exception e)
{
- log.error("Failed to update topology", e);
+ log.error(this + "::Failed to update topology", e);
}
}
}
- private void createNewRecord(final String targetNodeID,
- final TransportConfiguration connector,
- final SimpleString queueName,
- final Queue queue,
- final boolean start) throws Exception
+ private synchronized void createNewRecord(final String targetNodeID,
+ final TransportConfiguration connector,
+ final SimpleString queueName,
+ final Queue queue,
+ final boolean start) throws Exception
{
+ if (serverLocator != null)
+ {
+ return;
+ }
+
MessageFlowRecordImpl record = new MessageFlowRecordImpl(targetNodeID, connector, queueName, queue);
Bridge bridge = createClusteredBridge(record);
-
+
if (log.isDebugEnabled())
{
log.debug("XXX creating record between " + this.connector + " and " + connector + bridge);
}
-
+
record.setBridge(bridge);
records.put(targetNodeID, record);
@@ -663,9 +687,12 @@
*/
protected Bridge createClusteredBridge(MessageFlowRecordImpl record) throws Exception
{
-
- final ServerLocatorInternal targetLocator = new ServerLocatorImpl(this.clusterManagerTopology, false, record.getConnector());
-
+
+ final ServerLocatorInternal targetLocator = new ServerLocatorImpl(this.clusterManagerTopology,
+ false,
+ server.getThreadPool(), server.getScheduledPool(),
+ record.getConnector());
+
targetLocator.setReconnectAttempts(0);
targetLocator.setInitialConnectAttempts(0);
@@ -677,20 +704,20 @@
targetLocator.setBlockOnDurableSend(!useDuplicateDetection);
targetLocator.setBlockOnNonDurableSend(!useDuplicateDetection);
targetLocator.setClusterConnection(true);
-
+
targetLocator.setRetryInterval(retryInterval);
targetLocator.setMaxRetryInterval(maxRetryInterval);
targetLocator.setRetryIntervalMultiplier(retryIntervalMultiplier);
-
+
targetLocator.setNodeID(serverLocator.getNodeID());
targetLocator.setClusterTransportConfiguration(serverLocator.getClusterTransportConfiguration());
-
- if(retryInterval > 0)
+
+ if (retryInterval > 0)
{
targetLocator.setRetryInterval(retryInterval);
}
-
+
manager.addClusterLocator(targetLocator);
ClusterConnectionBridge bridge = new ClusterConnectionBridge(this,
@@ -719,9 +746,8 @@
record,
record.getConnector());
+ targetLocator.setIdentity("(Cluster-connection-bridge::" + bridge.toString() + "::" + this.toString() + ")");
- targetLocator.setIdentity("(Cluster-connection-bridge::" + bridge.toString() + "::" + this.toString() + ")");
-
return bridge;
}
@@ -732,12 +758,15 @@
private Bridge bridge;
private final String targetNodeID;
+
private final TransportConfiguration connector;
+
private final SimpleString queueName;
+
private final Queue queue;
private final Map<SimpleString, RemoteQueueBinding> bindings = new HashMap<SimpleString, RemoteQueueBinding>();
-
+
private volatile boolean isClosed = false;
private volatile boolean firstReset = false;
@@ -752,8 +781,6 @@
this.connector = connector;
this.queueName = queueName;
}
-
-
/* (non-Javadoc)
* @see java.lang.Object#toString()
@@ -771,12 +798,10 @@
", isClosed=" +
isClosed +
", firstReset=" +
- firstReset +
+ firstReset +
"]";
}
-
-
public String getAddress()
{
return address.toString();
@@ -825,14 +850,14 @@
{
log.trace("Stopping bridge " + bridge);
}
-
+
isClosed = true;
clearBindings();
-
+
bridge.stop();
}
- public boolean isClosed()
+ public boolean isClosed()
{
return isClosed;
}
@@ -842,7 +867,7 @@
clearBindings();
}
- public void setBridge(final Bridge bridge)
+ public void setBridge(final Bridge bridge)
{
this.bridge = bridge;
}
@@ -856,7 +881,7 @@
{
if (isTrace)
{
- log.trace("Flow record on " + clusterConnector + " Receiving message " + message);
+ log.trace("Flow record on " + clusterConnector + " Receiving message " + message);
}
try
{
@@ -1049,12 +1074,12 @@
return;
}
-
+
if (isTrace)
{
log.trace("Adding binding " + clusterName + " into " + ClusterConnectionImpl.this);
}
-
+
bindings.put(clusterName, binding);
try
@@ -1083,7 +1108,7 @@
}
SimpleString clusterName = message.getSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME);
-
+
System.out.println("Removing clusterName=" + clusterName + " on " + ClusterConnectionImpl.this);
removeBinding(clusterName);
@@ -1126,10 +1151,12 @@
SimpleString filterString = message.getSimpleStringProperty(ManagementHelper.HDR_FILTERSTRING);
RemoteQueueBinding binding = bindings.get(clusterName);
-
+
if (binding == null)
{
- throw new IllegalStateException("Cannot find binding for " + clusterName + " on " + ClusterConnectionImpl.this);
+ throw new IllegalStateException("Cannot find binding for " + clusterName +
+ " on " +
+ ClusterConnectionImpl.this);
}
binding.addConsumer(filterString);
@@ -1223,7 +1250,7 @@
{
return records;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@@ -1245,18 +1272,16 @@
StringWriter str = new StringWriter();
PrintWriter out = new PrintWriter(str);
-
out.println(this);
out.println("***************************************");
out.println(name + " connected to");
for (Entry<String, MessageFlowRecord> messageFlow : records.entrySet())
{
- out.println("\t Bridge = " + messageFlow.getValue().getBridge());
+ out.println("\t Bridge = " + messageFlow.getValue().getBridge());
out.println("\t Flow Record = " + messageFlow.getValue());
}
out.println("***************************************");
-
-
+
return str.toString();
}
@@ -1276,13 +1301,13 @@
public ServerLocatorInternal createServerLocator()
{
- if(tcConfigs != null && tcConfigs.length > 0)
+ if (tcConfigs != null && tcConfigs.length > 0)
{
if (log.isDebugEnabled())
{
log.debug(ClusterConnectionImpl.this + "Creating a serverLocator for " + Arrays.toString(tcConfigs));
}
- return new ServerLocatorImpl(clusterManagerTopology, true, tcConfigs);
+ return new ServerLocatorImpl(clusterManagerTopology, true, server.getThreadPool(), server.getScheduledPool(), tcConfigs);
}
else
{
@@ -1298,8 +1323,7 @@
{
return "StaticClusterConnector [tcConfigs=" + Arrays.toString(tcConfigs) + "]";
}
-
-
+
}
private class DiscoveryClusterConnector implements ClusterConnector
@@ -1313,7 +1337,7 @@
public ServerLocatorInternal createServerLocator()
{
- return new ServerLocatorImpl(clusterManagerTopology, true, dg);
+ return new ServerLocatorImpl(clusterManagerTopology, true, server.getThreadPool(), server.getScheduledPool(), dg);
}
}
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -864,6 +864,11 @@
return scheduledPool;
}
+ public ExecutorService getThreadPool()
+ {
+ return threadPool;
+ }
+
public Configuration getConfiguration()
{
return configuration;
@@ -1349,7 +1354,7 @@
{
// Create the pools - we have two pools - one for non scheduled - and another for scheduled
- ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-server-threads" + System.identityHashCode(this),
+ ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-server-" + this.toString(),
false,
getThisClassLoader());
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/utils/HornetQThreadFactory.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/utils/HornetQThreadFactory.java 2011-08-03 10:47:25 UTC (rev 11101)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/utils/HornetQThreadFactory.java 2011-08-03 19:53:17 UTC (rev 11102)
@@ -63,7 +63,7 @@
// when sandboxed, the code does not have the RuntimePermission modifyThreadGroup
if (System.getSecurityManager() == null)
{
- t = new Thread(group, command, "Thread-" + threadCount.getAndIncrement() + " (group:" + group.getName() + ")");
+ t = new Thread(group, command, "Thread-" + threadCount.getAndIncrement() + " (" + group.getName() + ")");
}
else
{
13 years, 5 months
JBoss hornetq SVN: r11101 - in branches/HORNETQ-720_Replication: hornetq-journal/src/main/java/org/hornetq/core/journal/impl and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-08-03 06:47:25 -0400 (Wed, 03 Aug 2011)
New Revision: 11101
Modified:
branches/HORNETQ-720_Replication/
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
Log:
merge from trunk
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-11098
+ /trunk:10878-11100
Modified: branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-03 10:41:28 UTC (rev 11100)
+++ branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-03 10:47:25 UTC (rev 11101)
@@ -1891,6 +1891,7 @@
int lastDataPos = JournalImpl.SIZE_HEADER;
+ // AtomicLong is used only as a reference, not as an Atomic value
final AtomicLong maxID = new AtomicLong(-1);
for (final JournalFile file : orderedFiles)
@@ -1902,9 +1903,17 @@
int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
{
+ private void checkID(final long id)
+ {
+ if (id > maxID.longValue())
+ {
+ maxID.set(id);
+ }
+ }
+
public void onReadAddRecord(final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -1915,7 +1924,7 @@
public void onReadUpdateRecord(final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -1956,7 +1965,7 @@
public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -2201,7 +2210,10 @@
{
for (RecordInfo info : transaction.recordInfos)
{
- setAtomicLong(info.id, maxID);
+ if (info.id > maxID.get())
+ {
+ maxID.set(info.id);
+ }
}
PreparedTransactionInfo info = new PreparedTransactionInfo(transaction.transactionID, transaction.extraData);
@@ -2663,23 +2675,6 @@
}
- private static final void setAtomicLong(final long target, AtomicLong atomic)
- {
- while (true)
- {
- long value = atomic.get();
- if (target > value)
- {
- if (atomic.compareAndSet(value, target))
- return;
- }
- else
- {
- return;
- }
- }
- }
-
/**
* @param name
* @return
13 years, 5 months
JBoss hornetq SVN: r11100 - trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-08-03 06:41:28 -0400 (Wed, 03 Aug 2011)
New Revision: 11100
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
Log:
Revert correct handling of AtomicLong. Document usage as reference.
Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-03 10:18:10 UTC (rev 11099)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-03 10:41:28 UTC (rev 11100)
@@ -1902,6 +1902,7 @@
int lastDataPos = JournalImpl.SIZE_HEADER;
+ // AtomicLong is used only as a reference, not as an Atomic value
final AtomicLong maxID = new AtomicLong(-1);
for (final JournalFile file : orderedFiles)
@@ -1913,9 +1914,17 @@
int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
{
+ private void checkID(final long id)
+ {
+ if (id > maxID.longValue())
+ {
+ maxID.set(id);
+ }
+ }
+
public void onReadAddRecord(final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -1926,7 +1935,7 @@
public void onReadUpdateRecord(final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -1967,7 +1976,7 @@
public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception
{
- setAtomicLong(info.id, maxID);
+ checkID(info.id);
hasData.set(true);
@@ -2212,7 +2221,10 @@
{
for (RecordInfo info : transaction.recordInfos)
{
- setAtomicLong(info.id, maxID);
+ if (info.id > maxID.get())
+ {
+ maxID.set(info.id);
+ }
}
PreparedTransactionInfo info = new PreparedTransactionInfo(transaction.transactionID, transaction.extraData);
@@ -2679,23 +2691,6 @@
}
- private static final void setAtomicLong(final long target, AtomicLong atomic)
- {
- while (true)
- {
- long value = atomic.get();
- if (target > value)
- {
- if (atomic.compareAndSet(value, target))
- return;
- }
- else
- {
- return;
- }
- }
- }
-
/**
* @param name
* @return
13 years, 5 months
JBoss hornetq SVN: r11099 - in branches/HORNETQ-720_Replication: hornetq-core and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-08-03 06:18:10 -0400 (Wed, 03 Aug 2011)
New Revision: 11099
Modified:
branches/HORNETQ-720_Replication/
branches/HORNETQ-720_Replication/README
branches/HORNETQ-720_Replication/hornetq-core/pom.xml
Log:
merge from trunk
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-11095
+ /trunk:10878-11098
Modified: branches/HORNETQ-720_Replication/README
===================================================================
--- branches/HORNETQ-720_Replication/README 2011-08-03 10:06:47 UTC (rev 11098)
+++ branches/HORNETQ-720_Replication/README 2011-08-03 10:18:10 UTC (rev 11099)
@@ -44,6 +44,6 @@
** Install the m2Eclipse plugin, and use it to import the root
project. Each sub-project will be imported automatically.
-The M2Eclipse plugin has some limitations, after importing the projects
-you should use "Maven / Update project configuration" to fix up the
-projects. If necessary consult the M2Eclipse plugin FAQ.
+The M2Eclipse plugin only works correctly with javacc Maven rules in
+Eclipse 3.7. In Eclipse 3.6 after importing the projects you should use
+"Maven / Update project configuration" to fix up the projects.
Modified: branches/HORNETQ-720_Replication/hornetq-core/pom.xml
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/pom.xml 2011-08-03 10:06:47 UTC (rev 11098)
+++ branches/HORNETQ-720_Replication/hornetq-core/pom.xml 2011-08-03 10:18:10 UTC (rev 11099)
@@ -88,36 +88,6 @@
</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, 5 months
JBoss hornetq SVN: r11098 - in trunk: hornetq-core and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-08-03 06:06:47 -0400 (Wed, 03 Aug 2011)
New Revision: 11098
Modified:
trunk/README
trunk/hornetq-core/pom.xml
Log:
Eclipse 3.7 M2E plugin now supports javacc rules.
Therefore there is no more need for the work around in hq-core/pom.xml.
Modified: trunk/README
===================================================================
--- trunk/README 2011-08-02 16:13:17 UTC (rev 11097)
+++ trunk/README 2011-08-03 10:06:47 UTC (rev 11098)
@@ -44,6 +44,6 @@
** Install the m2Eclipse plugin, and use it to import the root
project. Each sub-project will be imported automatically.
-The M2Eclipse plugin has some limitations, after importing the projects
-you should use "Maven / Update project configuration" to fix up the
-projects. If necessary consult the M2Eclipse plugin FAQ.
+The M2Eclipse plugin only works correctly with javacc Maven rules in
+Eclipse 3.7. In Eclipse 3.6 after importing the projects you should use
+"Maven / Update project configuration" to fix up the projects.
Modified: trunk/hornetq-core/pom.xml
===================================================================
--- trunk/hornetq-core/pom.xml 2011-08-02 16:13:17 UTC (rev 11097)
+++ trunk/hornetq-core/pom.xml 2011-08-03 10:06:47 UTC (rev 11098)
@@ -88,36 +88,6 @@
</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, 5 months
JBoss hornetq SVN: r11097 - branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-08-02 12:13:17 -0400 (Tue, 02 Aug 2011)
New Revision: 11097
Modified:
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
tweaks
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-08-02 14:37:41 UTC (rev 11096)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-08-02 16:13:17 UTC (rev 11097)
@@ -378,7 +378,7 @@
{
Logger log = Logger.getLogger(this.getClass());
log.info(message);
- System.out.println(message);
+ System.out.println(this.getClass().getName() + "::" + message);
}
protected static TestSuite createAIOTestSuite(final Class<?> clazz)
@@ -887,7 +887,7 @@
previousThreads = Thread.getAllStackTraces();
- UnitTestCase.log.info("###### starting test " + this.getClass().getName() + "." + getName());
+ logAndSystemOut("#test " + getName());
}
@Override
13 years, 5 months