JBoss hornetq SVN: r11471 - in trunk/hornetq-core/src/main/java/org/hornetq: core/settings/impl and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-05 12:42:19 -0400 (Wed, 05 Oct 2011)
New Revision: 11471
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
Log:
Type fixes
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-05 16:42:19 UTC (rev 11471)
@@ -227,7 +227,7 @@
}
}
}
- List<Pair> toRemove = new ArrayList<Pair>();
+ List<Pair<URL, Deployer>> toRemove = new ArrayList<Pair<URL, Deployer>>();
for (Map.Entry<Pair<URL, Deployer>, DeployInfo> entry : deployed.entrySet())
{
Pair<URL, Deployer> pair = entry.getKey();
@@ -246,7 +246,7 @@
}
}
}
- for (Pair pair : toRemove)
+ for (Pair<URL, Deployer> pair : toRemove)
{
deployed.remove(pair);
}
@@ -271,7 +271,7 @@
/**
* Checks if the URL is among the current thread context class loader's resources.
- *
+ *
* We do not check that the corresponding file exists using File.exists() directly as it would fail
* in the case the resource is loaded from inside an EAR file (see https://jira.jboss.org/jira/browse/HORNETQ-122)
*/
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-10-05 16:42:19 UTC (rev 11471)
@@ -47,7 +47,7 @@
* all the matches
*/
private final Map<String, Match<T>> matches = new HashMap<String, Match<T>>();
-
+
/**
* Certain values cannot be removed after installed.
* This is because we read a few records from the main config.
@@ -72,13 +72,13 @@
*/
private final ArrayList<HierarchicalRepositoryChangeListener> listeners = new ArrayList<HierarchicalRepositoryChangeListener>();
-
+
public void addMatch(final String match, final T value)
{
addMatch(match, value, false);
}
-
+
/**
* Add a new match to the repository
*
@@ -98,7 +98,7 @@
matches.put(match, match1);
onChange();
}
-
+
public int getCacheSize()
{
return cache.size();
@@ -149,7 +149,7 @@
}
else
{
- ((Mergeable)actualMatch).merge(match.getValue());
+ ((Mergeable<T>)actualMatch).merge(match.getValue());
}
}
@@ -220,7 +220,7 @@
listeners.clear();
matches.clear();
}
-
+
public void clearCache()
{
cache.clear();
Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java 2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java 2011-10-05 16:42:19 UTC (rev 11471)
@@ -331,8 +331,8 @@
NodeList nl2 = node2.getChildNodes();
short[] toFilter = new short[] { Node.TEXT_NODE, Node.ATTRIBUTE_NODE, Node.COMMENT_NODE };
- List nodes = XMLUtil.filter(nl, toFilter);
- List nodes2 = XMLUtil.filter(nl2, toFilter);
+ List<Node> nodes = XMLUtil.filter(nl, toFilter);
+ List<Node> nodes2 = XMLUtil.filter(nl2, toFilter);
int length = nodes.size();
@@ -343,8 +343,8 @@
for (int i = 0; i < length; i++)
{
- Node n = (Node)nodes.get(i);
- Node n2 = (Node)nodes2.get(i);
+ Node n = nodes.get(i);
+ Node n2 = nodes2.get(i);
XMLUtil.assertEquivalent(n, n2);
}
}
@@ -509,9 +509,9 @@
// Private --------------------------------------------------------------------------------------
- private static List filter(final NodeList nl, final short[] typesToFilter)
+ private static List<Node> filter(final NodeList nl, final short[] typesToFilter)
{
- List nodes = new ArrayList();
+ List<Node> nodes = new ArrayList<Node>();
outer: for (int i = 0; i < nl.getLength(); i++)
{
13 years, 2 months
JBoss hornetq SVN: r11470 - trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-05 12:41:58 -0400 (Wed, 05 Oct 2011)
New Revision: 11470
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
Log:
visibility fixes
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -50,9 +50,9 @@
private static final boolean trace = ClientConsumerImpl.log.isTraceEnabled();
- public static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
+ private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
- public static final int NUM_PRIORITIES = 10;
+ private static final int NUM_PRIORITIES = 10;
public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_hornetq.forced.delivery.seq");
@@ -642,11 +642,11 @@
}
}
- /**
- *
+ /**
+ *
* LargeMessageBuffer will call flowcontrol here, while other handleMessage will also be calling flowControl.
* So, this operation needs to be atomic.
- *
+ *
* @param discountSlowConsumer When dealing with slowConsumers, we need to discount one credit that was pre-sent when the first receive was called. For largeMessage that is only done at the latest packet
*/
public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws HornetQException
@@ -707,7 +707,7 @@
// Private
// ---------------------------------------------------------------------------------------
- /**
+ /**
* Sending a initial credit for slow consumers
* */
private void startSlowConsumer()
@@ -741,7 +741,7 @@
{
ClientConsumerImpl.log.trace("Adding Runner on Executor for delivery");
}
-
+
sessionExecutor.execute(runner);
}
@@ -824,7 +824,7 @@
//Ignore, this could be a relic from a previous receiveImmediate();
return;
}
-
+
boolean expired = message.isExpired();
flowControlBeforeConsumption(message);
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -23,9 +23,10 @@
import org.hornetq.utils.DataConstants;
/**
- * ClientLargeMessageImpl is only created when receiving large messages. At the time of sending a regular Message is sent as we won't know the message is considered large
+ * ClientLargeMessageImpl is only created when receiving large messages.
+ * <p>
+ * At the time of sending a regular Message is sent as we won't know the message is considered large
* until the buffer is filled up or the user set a streaming.
- *
* @author clebertsuconic
*/
public class ClientLargeMessageImpl extends ClientMessageImpl implements ClientLargeMessageInternal
@@ -209,11 +210,11 @@
// Inner classes -------------------------------------------------
- protected class HornetQOutputStream extends OutputStream
+ private class HornetQOutputStream extends OutputStream
{
- HornetQBuffer bufferOut;
+ private final HornetQBuffer bufferOut;
- HornetQOutputStream(HornetQBuffer out)
+ private HornetQOutputStream(HornetQBuffer out)
{
this.bufferOut = out;
}
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -25,7 +25,7 @@
*
*
*/
-public class ClientProducerCreditsImpl implements ClientProducerCredits
+class ClientProducerCreditsImpl implements ClientProducerCredits
{
private static final Logger log = Logger.getLogger(ClientProducerCreditsImpl.class);
@@ -38,10 +38,10 @@
private final ClientSessionInternal session;
private int arriving;
-
+
private int refCount;
-
- public ClientProducerCreditsImpl(final ClientSessionInternal session,
+
+ ClientProducerCreditsImpl(final ClientSessionInternal session,
final SimpleString address,
final int windowSize)
{
@@ -73,7 +73,7 @@
{
arriving -= credits;
}
-
+
semaphore.release(credits);
}
@@ -84,7 +84,7 @@
semaphore.drainPermits();
int beforeFailure = arriving;
-
+
arriving = 0;
// If we are waiting for more credits than what's configured, then we need to use what we tried before
@@ -98,22 +98,22 @@
semaphore.release(Integer.MAX_VALUE / 2);
}
-
+
public synchronized void incrementRefCount()
{
refCount++;
}
-
+
public synchronized int decrementRefCount()
{
return --refCount;
}
-
+
public synchronized void releaseOutstanding()
{
semaphore.drainPermits();
}
-
+
private void checkCredits(final int credits)
{
int needed = Math.max(credits, windowSize);
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -36,13 +36,13 @@
/**
* The client-side Producer connectionFactory class.
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
* @author <a href="mailto:ataylor@redhat.com">Andy Taylor</a>
* @version <tt>$Revision$</tt> $Id$
*/
-public class ClientProducerImpl implements ClientProducerInternal
+class ClientProducerImpl implements ClientProducerInternal
{
// Constants ------------------------------------------------------------------------------------
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -145,7 +145,7 @@
private volatile boolean closed;
- public final Exception e = new Exception();
+ private final Exception e = new Exception();
private final Object waitLock = new Object();
@@ -155,7 +155,7 @@
// Constructors
// ---------------------------------------------------------------------------------
- public ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
+ ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
final TransportConfiguration connectorConfig,
final long callTimeout,
final long clientFailureCheckPeriod,
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -95,13 +95,8 @@
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
*
* @author <a href="mailto:ataylor@redhat.com">Andy Taylor</a>
- *
- * @version <tt>$Revision: 3603 $</tt> $Id: ClientSessionImpl.java 3603 2008-01-21 18:49:20Z timfox $
- *
- * $Id: ClientSessionImpl.java 3603 2008-01-21 18:49:20Z timfox $
- *
*/
-public class ClientSessionImpl implements ClientSessionInternal, FailureListener, CommandConfirmationHandler
+class ClientSessionImpl implements ClientSessionInternal, FailureListener, CommandConfirmationHandler
{
// Constants ----------------------------------------------------------------------------
@@ -195,7 +190,7 @@
// Constructors ----------------------------------------------------------------------------
- public ClientSessionImpl(final ClientSessionFactoryInternal sessionFactory,
+ ClientSessionImpl(final ClientSessionFactoryInternal sessionFactory,
final String name,
final String username,
final String password,
@@ -665,7 +660,7 @@
stop(true);
}
- public void stop(final boolean waitForOnMessage) throws HornetQException
+ private void stop(final boolean waitForOnMessage) throws HornetQException
{
checkClosed();
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java 2011-10-05 16:41:58 UTC (rev 11470)
@@ -40,7 +40,7 @@
*
*
*/
-public class CompressedLargeMessageControllerImpl implements LargeMessageController
+class CompressedLargeMessageControllerImpl implements LargeMessageController
{
// Constants -----------------------------------------------------
@@ -51,13 +51,13 @@
// Attributes ----------------------------------------------------
- final LargeMessageController bufferDelegate;
-
+ private final LargeMessageController bufferDelegate;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
- public CompressedLargeMessageControllerImpl(final LargeMessageController bufferDelegate)
+ CompressedLargeMessageControllerImpl(final LargeMessageController bufferDelegate)
{
this.bufferDelegate = bufferDelegate;
}
@@ -66,7 +66,7 @@
// Public --------------------------------------------------------
/**
- *
+ *
*/
public void discardUnusedPackets()
{
@@ -104,7 +104,7 @@
}
/**
- *
+ *
* @param timeWait Milliseconds to Wait. 0 means forever
* @throws Exception
*/
@@ -130,9 +130,9 @@
{
return -1;
}
-
+
DataInputStream dataInput = null;
-
+
private DataInputStream getStream()
{
if (dataInput == null)
@@ -140,18 +140,18 @@
try
{
InputStream input = new HornetQBufferInputStream(bufferDelegate);
-
+
dataInput = new DataInputStream(new InflaterReader(input));
}
catch (Exception e)
{
throw new RuntimeException (e.getMessage(), e);
}
-
+
}
return dataInput;
}
-
+
private void positioningNotSupported()
{
throw new IllegalStateException("Position not supported over compressed large messages");
@@ -300,9 +300,9 @@
positioningNotSupported();
return 0;
}
-
-
+
+
public int getUnsignedMedium(final long index)
{
positioningNotSupported();
@@ -579,7 +579,7 @@
{
try
{
- return (short)getStream().readShort();
+ return getStream().readShort();
}
catch (Exception e)
{
@@ -591,7 +591,7 @@
{
try
{
- return (int)getStream().readUnsignedShort();
+ return getStream().readUnsignedShort();
}
catch (Exception e)
{
@@ -609,7 +609,7 @@
return value;
}
-
+
public int readUnsignedMedium()
{
return (readByte() & 0xff) << 16 | (readByte() & 0xff) << 8 | (readByte() & 0xff) << 0;
@@ -708,7 +708,7 @@
public void skipBytes(final int length)
{
-
+
try
{
for (int i = 0 ; i < length; i++)
@@ -827,7 +827,7 @@
{
return (char)readShort();
}
-
+
public char getChar(final int index)
{
return (char)getShort(index);
13 years, 2 months
JBoss hornetq SVN: r11469 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-10-04 15:08:27 -0400 (Tue, 04 Oct 2011)
New Revision: 11469
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
Log:
Removing XXX from log.trace
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-10-04 15:05:56 UTC (rev 11468)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2011-10-04 19:08:27 UTC (rev 11469)
@@ -548,7 +548,7 @@
if (log.isTraceEnabled())
{
- log.trace("XXX going to send message " + message);
+ log.trace("going to send message " + message);
}
try
13 years, 2 months
JBoss hornetq SVN: r11468 - branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 11:05:56 -0400 (Tue, 04 Oct 2011)
New Revision: 11468
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-720 HORNETQ-776 Make the backup's ServerLocator HA.
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-04 14:30:50 UTC (rev 11467)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-04 15:05:56 UTC (rev 11468)
@@ -549,8 +549,7 @@
clusterManager.start();
final TransportConfiguration config = configuration.getConnectorConfigurations().get(liveConnectorName);
- serverLocator =
- (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(config);
+ serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(config);
serverLocator.setReconnectAttempts(-1);
13 years, 2 months
JBoss hornetq SVN: r11467 - in branches/HORNETQ-720_Replication: tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 10:30:50 -0400 (Tue, 04 Oct 2011)
New Revision: 11467
Added:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/QuorumFailOverTest.java
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java
Log:
HORNETQ-720 HORNETQ-776 Attempt of testing quorum voting (but backup does not get correct topology)
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java 2011-10-04 13:35:44 UTC (rev 11466)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java 2011-10-04 14:30:50 UTC (rev 11467)
@@ -67,10 +67,7 @@
// decide to wake backup
clusterManager.removeClusterTopologyListener(this, true);
}
- else
- {
- nodes.remove(nodeID);
- }
+ nodes.remove(nodeID);
}
public boolean isNodeDown()
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-10-04 13:35:44 UTC (rev 11466)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-10-04 14:30:50 UTC (rev 11467)
@@ -41,13 +41,11 @@
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
* Created 9 Mar 2009 16:31:21
- *
- *
*/
public abstract class ClusterWithBackupFailoverTestBase extends ClusterTestBase
{
- private static final String QUEUE_NAME = "queue0";
- private static final String QUEUES_TESTADDRESS = "queues.testaddress";
+ protected static final String QUEUE_NAME = "queue0";
+ protected static final String QUEUES_TESTADDRESS = "queues.testaddress";
private static final Logger log = Logger.getLogger(ClusterWithBackupFailoverTestBase.class);
protected abstract void setupCluster(final boolean forwardWhenNoConsumers) throws Exception;
@@ -251,8 +249,6 @@
send(2, QUEUES_TESTADDRESS, 10, false, null);
verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
-
-
removeConsumer(0);
removeConsumer(1);
removeConsumer(2);
Added: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/QuorumFailOverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/QuorumFailOverTest.java (rev 0)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/QuorumFailOverTest.java 2011-10-04 14:30:50 UTC (rev 11467)
@@ -0,0 +1,77 @@
+package org.hornetq.tests.integration.cluster.failover;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.hornetq.api.core.Pair;
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClusterTopologyListener;
+
+public class QuorumFailOverTest extends StaticClusterWithBackupFailoverTest
+{
+
+ public void testQuorumVoting() throws Exception
+ {
+ setupCluster();
+ startServers(0, 1, 2, 3, 4, 5);
+
+ final TopologyListener liveTopologyListener = new TopologyListener("LIVE-1");
+ servers[0].getClusterManager().addClusterTopologyListener(liveTopologyListener, true);
+
+ final TopologyListener backupTopologyListener = new TopologyListener("BACKUP-3");
+ servers[3].getClusterManager().addClusterTopologyListener(backupTopologyListener, true);
+
+ assertTrue("we assume 3 is a backup", servers[3].getConfiguration().isBackup());
+ assertFalse("no shared storage", servers[3].getConfiguration().isSharedStore());
+
+ setupSessionFactory(0, 3, isNetty(), false);
+ setupSessionFactory(1, 4, isNetty(), false);
+ setupSessionFactory(2, 5, isNetty(), false);
+
+ assertEquals(liveTopologyListener.toString(), 6, liveTopologyListener.nodes.size());
+ assertEquals(backupTopologyListener.toString(), 6, backupTopologyListener.nodes.size());
+
+ failNode(0);
+ }
+
+ @Override
+ protected boolean isSharedStorage()
+ {
+ return false;
+ }
+
+
+ private static class TopologyListener implements ClusterTopologyListener
+ {
+ final String prefix;
+ final ConcurrentMap<String, Pair<TransportConfiguration, TransportConfiguration>> nodes =
+ new ConcurrentHashMap<String, Pair<TransportConfiguration, TransportConfiguration>>();
+ public TopologyListener(String string)
+ {
+ prefix = string;
+ }
+
+ @Override
+ public
+ void nodeUP(String nodeID,
+ Pair<TransportConfiguration, TransportConfiguration> connectorPair,
+ boolean last)
+ {
+ nodes.put(nodeID, connectorPair);
+ System.out.println(prefix + " UP: " + nodeID);
+ }
+
+ @Override
+ public void nodeDown(String nodeID)
+ {
+ nodes.remove(nodeID);
+ System.out.println(prefix + " DOWN: " + nodeID);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "TopologyListener(" + prefix + ", #=" + nodes.size() + ")";
+ }
+ }
+}
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java 2011-10-04 13:35:44 UTC (rev 11466)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java 2011-10-04 14:30:50 UTC (rev 11467)
@@ -84,19 +84,25 @@
new int[] { 0, 1 });
}
+ protected boolean isSharedStorage()
+ {
+ return true;
+ }
+
@Override
protected void setupServers() throws Exception
{
// The backups
- setupBackupServer(3, 0, isFileStorage(), true, isNetty());
- setupBackupServer(4, 1, isFileStorage(), true, isNetty());
- setupBackupServer(5, 2, isFileStorage(), true, isNetty());
+ setupBackupServer(3, 0, isFileStorage(), isSharedStorage(), isNetty());
+ setupBackupServer(4, 1, isFileStorage(), isSharedStorage(), isNetty());
+ setupBackupServer(5, 2, isFileStorage(), isSharedStorage(), isNetty());
// The lives
- setupLiveServer(0, isFileStorage(), true, isNetty());
- setupLiveServer(1, isFileStorage(), true, isNetty());
- setupLiveServer(2, isFileStorage(), true, isNetty());
+ setupLiveServer(0, isFileStorage(), isSharedStorage(), isNetty());
+ setupLiveServer(1, isFileStorage(), isSharedStorage(), isNetty());
+ setupLiveServer(2, isFileStorage(), isSharedStorage(), isNetty());
}
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
13 years, 2 months
JBoss hornetq SVN: r11466 - branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 09:35:44 -0400 (Tue, 04 Oct 2011)
New Revision: 11466
Modified:
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestUnit.java
Log:
Fix exception tested for null filePrefix.
Modified: branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestUnit.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestUnit.java 2011-10-04 13:35:19 UTC (rev 11465)
+++ branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestUnit.java 2011-10-04 13:35:44 UTC (rev 11466)
@@ -28,9 +28,9 @@
import org.hornetq.tests.util.RandomUtil;
/**
- *
+ *
* A JournalImplTestBase
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
*
@@ -38,17 +38,18 @@
public abstract class JournalImplTestUnit extends JournalImplTestBase
{
private static final Logger log = Logger.getLogger(JournalImplTestUnit.class);
-
+
+ @Override
protected void tearDown() throws Exception
{
List<String> files = fileFactory.listFiles(fileExtension);
-
+
for (String file : files)
{
SequentialFile seqFile = fileFactory.createSequentialFile(file, 1);
assertEquals(fileSize, seqFile.size());
}
-
+
super.tearDown();
}
@@ -175,7 +176,7 @@
Assert.fail("Should throw exception");
}
- catch (NullPointerException e)
+ catch (IllegalArgumentException e)
{
// Ok
}
@@ -186,7 +187,7 @@
Assert.fail("Should throw exception");
}
- catch (NullPointerException e)
+ catch (IllegalArgumentException e)
{
// Ok
}
@@ -197,54 +198,54 @@
Assert.fail("Should throw exception");
}
- catch (NullPointerException e)
+ catch (IllegalArgumentException e)
{
// Ok
}
}
-
-
+
+
public void testVersionCheck() throws Exception
{
setup(10, 10 * 1024, true);
createJournal();
startJournal();
load();
-
+
stopJournal();
-
+
fileFactory.start();
List<String> files = fileFactory.listFiles(fileExtension);
-
+
for (String fileStr : files)
{
-
+
SequentialFile file = fileFactory.createSequentialFile(fileStr, 1);
-
+
ByteBuffer buffer = fileFactory.newBuffer(JournalImpl.SIZE_HEADER);
-
+
for (int i = 0 ; i < JournalImpl.SIZE_HEADER; i++)
{
buffer.put(Byte.MAX_VALUE);
}
-
+
buffer.rewind();
-
+
file.open();
-
+
file.position(0);
-
+
file.writeDirect(buffer, sync);
-
+
file.close();
}
-
+
fileFactory.stop();
startJournal();
-
+
boolean exceptionHappened = false;
try
{
@@ -255,11 +256,11 @@
exceptionHappened = true;
assertEquals(HornetQException.IO_ERROR, e.getCode());
}
-
+
assertTrue("Exception was expected", exceptionHappened);
stopJournal();
-
-
+
+
}
// Validates the if the journal will work when the IDs are over MaxInt
@@ -269,44 +270,44 @@
createJournal();
startJournal();
load();
-
+
stopJournal();
-
+
fileFactory.start();
List<String> files = fileFactory.listFiles(fileExtension);
-
+
long fileID = Integer.MAX_VALUE;
for (String fileStr : files)
{
SequentialFile file = fileFactory.createSequentialFile(fileStr, 1);
-
+
file.open();
-
+
JournalImpl.initFileHeader(fileFactory, file, journal.getUserVersion(), fileID++);
file.close();
}
-
+
fileFactory.stop();
startJournal();
-
+
load();
-
+
for (long i = 0 ; i < 100; i++)
{
add(i);
stopJournal();
-
+
startJournal();
loadAndCheck();
}
-
+
stopJournal();
-
+
}
@@ -496,8 +497,8 @@
return (fileSize - headerSize) / recordSize;
}
- /**
- *
+ /**
+ *
* Use: calculateNumberOfFiles (fileSize, numberOfRecords, recordSize, numberOfRecords2, recordSize2, , ...., numberOfRecordsN, recordSizeN);
* */
private int calculateNumberOfFiles(final int fileSize, final int alignment, final int... record) throws Exception
@@ -668,7 +669,7 @@
int addRecordsPerFile = calculateRecordsPerFile(10 * 1024,
journal.getAlignment(),
JournalImpl.SIZE_ADD_RECORD + 1 + recordLength);
-
+
System.out.println(JournalImpl.SIZE_ADD_RECORD + 1 + recordLength);
// Fills exactly 10 files
@@ -2296,7 +2297,7 @@
for (int i = 0; i < 100; i++)
{
- byte[] record = generateRecord(RandomUtil.randomInterval(1500, 10000));
+ byte[] record = generateRecord(RandomUtil.randomInterval(1500, 10000));
journal.appendAddRecord(i, (byte)0, record, false);
13 years, 2 months
JBoss hornetq SVN: r11465 - in branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq: core/protocol/core/impl/wireformat and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 09:35:19 -0400 (Tue, 04 Oct 2011)
New Revision: 11465
Added:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/api/core/client/ClusterTopologyListener.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-720 HORNETQ-776 Quorum voting for a backup (untested)
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/api/core/client/ClusterTopologyListener.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/api/core/client/ClusterTopologyListener.java 2011-10-04 13:33:11 UTC (rev 11464)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/api/core/client/ClusterTopologyListener.java 2011-10-04 13:35:19 UTC (rev 11465)
@@ -21,12 +21,10 @@
* A ClusterTopologyListener
*
* @author tim
- *
- *
*/
public interface ClusterTopologyListener
{
void nodeUP(String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last);
-
+
void nodeDown(String nodeID);
}
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java 2011-10-04 13:33:11 UTC (rev 11464)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/wireformat/ReplicationSyncFileMessage.java 2011-10-04 13:35:19 UTC (rev 11465)
@@ -2,6 +2,7 @@
import java.nio.ByteBuffer;
import java.util.EnumSet;
+import java.util.Set;
import org.hornetq.api.core.HornetQBuffer;
import org.hornetq.api.core.SimpleString;
@@ -30,12 +31,12 @@
private byte[] byteArray;
private SimpleString pageStoreName;
private FileType fileType;
-
public enum FileType
{
JOURNAL(0), PAGE(1), LARGE_MESSAGE(2);
private byte code;
+ private static final Set<FileType> ALL_OF = EnumSet.allOf(FileType.class);
private FileType(int code)
{
@@ -48,7 +49,7 @@
*/
public static FileType getFileType(byte readByte)
{
- for (FileType type : EnumSet.allOf(FileType.class))
+ for (FileType type : ALL_OF)
{
if (type.code == readByte)
return type;
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-04 13:33:11 UTC (rev 11464)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-04 13:35:19 UTC (rev 11465)
@@ -539,13 +539,15 @@
nodeManager.startBackup();
initialisePart1();
- clusterManager.start();
- String liveConnectorName = configuration.getLiveConnectorName();
+ final String liveConnectorName = configuration.getLiveConnectorName();
if (liveConnectorName == null)
{
throw new IllegalArgumentException("Cannot have a replicated backup without configuring its live-server!");
}
+ final QuorumManager quorumManager = new QuorumManager(clusterManager, nodeManager.getNodeId().toString());
+ clusterManager.start();
+
final TransportConfiguration config = configuration.getConnectorConfigurations().get(liveConnectorName);
serverLocator =
(ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(config);
@@ -559,21 +561,21 @@
{
try
{
- final ClientSessionFactory liveServerSessionFactory = serverLocator.connect();
+ final ClientSessionFactory liveServerSessionFactory = serverLocator.connect();
- if (liveServerSessionFactory == null)
- {
+ if (liveServerSessionFactory == null)
+ {
// XXX HORNETQ-768
- throw new RuntimeException("Need to retry...");
- }
- CoreRemotingConnection liveConnection = liveServerSessionFactory.getConnection();
- Channel pingChannel = liveConnection.getChannel(CHANNEL_ID.PING.id, -1);
- Channel replicationChannel = liveConnection.getChannel(CHANNEL_ID.REPLICATION.id, -1);
+ throw new RuntimeException("Need to retry?");
+ }
+ CoreRemotingConnection liveConnection = liveServerSessionFactory.getConnection();
+ Channel pingChannel = liveConnection.getChannel(CHANNEL_ID.PING.id, -1);
+ Channel replicationChannel = liveConnection.getChannel(CHANNEL_ID.REPLICATION.id, -1);
- connectToReplicationEndpoint(replicationChannel);
- replicationEndpoint.start();
+ connectToReplicationEndpoint(replicationChannel);
+ replicationEndpoint.start();
- clusterManager.announceReplicatingBackup(pingChannel);
+ clusterManager.announceReplicatingBackup(pingChannel);
}
catch (Exception e)
{
@@ -589,7 +591,14 @@
// Server node (i.e. Life node) is not running, now the backup takes over.
//we must remember to close stuff we don't need any more
- nodeManager.awaitLiveNode();
+ while (true)
+ {
+ nodeManager.awaitLiveNode();
+ if (quorumManager.isNodeDown())
+ {
+ break;
+ }
+ }
serverLocator.close();
replicationEndpoint.stop();
Added: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java (rev 0)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/QuorumManager.java 2011-10-04 13:35:19 UTC (rev 11465)
@@ -0,0 +1,170 @@
+package org.hornetq.core.server.impl;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
+
+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.ClusterTopologyListener;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.client.impl.ServerLocatorImpl;
+import org.hornetq.core.server.cluster.ClusterManager;
+
+/**
+ * Manages a quorum of servers used to determine whether a given server is running or not.
+ * <p>
+ * The use case scenario is an eventual connection loss between the live and the backup, where the
+ * quorum will help a remote backup in deciding whether to replace its 'live' server or to wait for
+ * it.
+ */
+final class QuorumManager implements ClusterTopologyListener
+{
+
+ // private static final Logger LOG = Logger.getLogger(QuorumManager.class);
+
+ // volatile boolean started;
+ private final ClusterManager clusterManager;
+ private final String targetServerName;
+ private final Map<String, Pair<TransportConfiguration, TransportConfiguration>> nodes =
+ new ConcurrentHashMap<String, Pair<TransportConfiguration, TransportConfiguration>>();
+ private static final long DISCOVERY_TIMEOUT = 3;
+
+ public QuorumManager(ClusterManager clusterManager, String nodeID)
+ {
+ this.clusterManager = clusterManager;
+ this.targetServerName = nodeID;
+
+ clusterManager.addClusterTopologyListener(this, true);
+ }
+
+ @Override
+ public void nodeUP(String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last)
+ {
+ if (targetServerName.equals(nodeID))
+ {
+ return;
+ }
+ nodes.put(nodeID, connectorPair);
+ }
+
+ @Override
+ public void nodeDown(String nodeID)
+ {
+ if (targetServerName.equals(nodeID))
+ {
+ // targetReturned = false;
+ // trigger action
+
+ // decide to wake backup
+ clusterManager.removeClusterTopologyListener(this, true);
+ }
+ else
+ {
+ nodes.remove(nodeID);
+ }
+ }
+
+ public boolean isNodeDown()
+ {
+ boolean liveShutdownCleanly = !nodes.containsKey(targetServerName);
+ boolean noOtherServersAround = nodes.size() == 0;
+ if (liveShutdownCleanly || noOtherServersAround)
+ return true;
+ // go for the vote...
+ // Set<ServerLocator> currentNodes = new HashSet(nodes.entrySet());
+ final int size = nodes.size();
+ Set<ServerLocator> locatorsList = new HashSet<ServerLocator>(size);
+ AtomicInteger pingCount = new AtomicInteger(0);
+ ExecutorService pool = Executors.newFixedThreadPool(size);
+ final CountDownLatch latch = new CountDownLatch(size);
+ try
+ {
+ for (Entry<String, Pair<TransportConfiguration, TransportConfiguration>> pair : nodes.entrySet())
+ {
+ if (targetServerName.equals(pair.getKey()))
+ continue;
+ TransportConfiguration serverTC = pair.getValue().a;
+ ServerLocatorImpl locator = (ServerLocatorImpl)HornetQClient.createServerLocatorWithoutHA(serverTC);
+ locatorsList.add(locator);
+ pool.submit(new ServerConnect(latch, pingCount, locator));
+ }
+ // Some servers may have disappeared between the latch creation
+ for (int i = 0; i < size - locatorsList.size(); i++)
+ {
+ latch.countDown();
+ }
+ try
+ {
+ latch.await();
+ }
+ catch (InterruptedException interruption)
+ {
+ // No-op. As the best the quorum can do now is to return the latest number it has
+ }
+ return pingCount.get() * 2 >= locatorsList.size();
+ }
+ finally
+ {
+ for (ServerLocator locator: locatorsList){
+ try
+ {
+ locator.close();
+ }
+ catch (Exception e)
+ {
+ // no-op
+ }
+ }
+ pool.shutdownNow();
+ }
+ }
+
+ private static class ServerConnect implements Runnable
+ {
+ private final ServerLocatorImpl locator;
+ private final CountDownLatch latch;
+ private final AtomicInteger count;
+
+ public ServerConnect(CountDownLatch latch, AtomicInteger count, ServerLocatorImpl serverLocator)
+ {
+ locator = serverLocator;
+ this.latch = latch;
+ this.count = count;
+ }
+
+ @Override
+ public void run()
+ {
+ locator.setReconnectAttempts(-1);
+ locator.getDiscoveryGroupConfiguration().setDiscoveryInitialWaitTimeout(DISCOVERY_TIMEOUT);
+
+ final ClientSessionFactory liveServerSessionFactory;
+ try
+ {
+ liveServerSessionFactory = locator.connect();
+ if (liveServerSessionFactory != null)
+ {
+ count.incrementAndGet();
+ }
+ }
+ catch (Exception e)
+ {
+ // no-op
+ }
+ finally
+ {
+ latch.countDown();
+ }
+ }
+
+ }
+}
13 years, 2 months
JBoss hornetq SVN: r11464 - in branches/HORNETQ-720_Replication: tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 09:33:11 -0400 (Tue, 04 Oct 2011)
New Revision: 11464
Removed:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
Modified:
branches/HORNETQ-720_Replication/
Log:
merge from trunk
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-11461
+ /trunk:10878-11463
Deleted: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java 2011-10-04 12:36:02 UTC (rev 11463)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java 2011-10-04 13:33:11 UTC (rev 11464)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.hornetq.tests.integration.cluster.failover;
-
-/**
- * A FileStorageClusterWithBackupFailoverTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- *
- */
-public class FileStorageStaticClusterWithBackupFailoverTest extends StaticClusterWithBackupFailoverTest
-{
-}
13 years, 2 months
JBoss hornetq SVN: r11463 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-04 08:36:02 -0400 (Tue, 04 Oct 2011)
New Revision: 11463
Removed:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
Log:
Delete FileStorageStaticClusterWithBackupFailoverTest as it is the same as StaticClusterWithBackupFailoverTest
Deleted: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java 2011-10-03 15:46:57 UTC (rev 11462)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java 2011-10-04 12:36:02 UTC (rev 11463)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.hornetq.tests.integration.cluster.failover;
-
-/**
- * A FileStorageClusterWithBackupFailoverTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- *
- */
-public class FileStorageStaticClusterWithBackupFailoverTest extends StaticClusterWithBackupFailoverTest
-{
-}
13 years, 2 months
JBoss hornetq SVN: r11462 - in branches/HORNETQ-720_Replication: tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-10-03 11:46:57 -0400 (Mon, 03 Oct 2011)
New Revision: 11462
Modified:
branches/HORNETQ-720_Replication/
branches/HORNETQ-720_Replication/README
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java
Log:
merge from trunk
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-11427
+ /trunk:10878-11461
Modified: branches/HORNETQ-720_Replication/README
===================================================================
--- branches/HORNETQ-720_Replication/README 2011-10-03 15:40:40 UTC (rev 11461)
+++ branches/HORNETQ-720_Replication/README 2011-10-03 15:46:57 UTC (rev 11462)
@@ -15,7 +15,7 @@
You need Maven 3.X.
Do note that there are some compatibility issues with Maven 3.X still
-unsolved [1]. This is specially true for the 'site' plugin [2].
+unsolved [1]. This is specially true for the 'site' plugin [2].
[1]: <https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html>
[2]: <https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html>
@@ -37,13 +37,11 @@
* Eclipse
-** Use the Maven eclipse plugin to configure the sub-projects
+Maven support has been improved a lot in Eclipse 3.7 "Indigo", you
+really should use it. There are still some Maven plugins used by
+documentation sub-projects which are not supported even in Eclipse 3.7.
-$ mvn eclipse:eclipse
-
-** Install the m2Eclipse plugin, and use it to import the root
- project. Each sub-project will be imported automatically.
-
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.
+Eclipse 3.7. So in Eclipse 3.6 you need install M2Eclipse yourself, and
+after importing the projects you should use "Maven / Update project
+configuration" to fix up the projects.
Modified: branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java 2011-10-03 15:40:40 UTC (rev 11461)
+++ branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationValidationTest.java 2011-10-03 15:46:57 UTC (rev 11462)
@@ -51,7 +51,7 @@
String xml = "<configuration xmlns='urn:hornetq'>" + "</configuration>";
Element element = XMLUtil.stringToElement(xml);
Assert.assertNotNull(element);
- XMLUtil.validate(element, "hornetq-configuration.xsd");
+ XMLUtil.validate(element, "schema/hornetq-configuration.xsd");
}
public void testFullConfiguration() throws Exception
13 years, 2 months