JBoss hornetq SVN: r11653 - in trunk: hornetq-core/src/main/java/org/hornetq/core/server/impl and 6 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-03 09:42:07 -0400 (Thu, 03 Nov 2011)
New Revision: 11653
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/FileLockNodeManager.java
trunk/hornetq-jms/src/main/java/org/hornetq/jms/client/HornetQTemporaryQueue.java
trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/JMSServerManager.java
trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/CountDownSessionFailureListener.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java
Log:
clean up
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-11-03 13:41:25 UTC (rev 11652)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -960,11 +960,8 @@
{
if (ClientSessionFactoryImpl.log.isTraceEnabled())
{
- ClientSessionFactoryImpl.log.trace("getConnectionWithRetry::" + reconnectAttempts +
- " with retryInterval = " +
- retryInterval +
- " multiplier = " +
- retryIntervalMultiplier, new Exception("trace"));
+ ClientSessionFactoryImpl.log.trace("getConnectionWithRetry::" + reconnectAttempts + " with retryInterval = " +
+ retryInterval + " multiplier = " + retryIntervalMultiplier, new Exception("trace"));
}
long interval = retryInterval;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/FileLockNodeManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/FileLockNodeManager.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/FileLockNodeManager.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -35,7 +35,7 @@
{
private final Logger log = Logger.getLogger(this.getClass());
- protected static final String SERVER_LOCK_NAME = "server.lock";
+ private static final String SERVER_LOCK_NAME = "server.lock";
private static final String ACCESS_MODE = "rw";
@@ -149,13 +149,13 @@
return false;
}
}
-
+
public boolean isLiveLocked()
{
return liveLock != null;
}
-
+
@Override
public void interrupt()
{
@@ -258,7 +258,7 @@
backupLock.release();
backupLock = null;
}
-
+
}
public String getDirectory()
@@ -386,7 +386,7 @@
{
// This just means that another object on the same JVM is holding the lock
}
-
+
if (lock == null)
{
try
@@ -403,7 +403,7 @@
return lock;
}
}
-
+
// todo this is here because sometimes channel.lock throws a resource deadlock exception but trylock works,
// need to investigate further and review
FileLock lock;
Modified: trunk/hornetq-jms/src/main/java/org/hornetq/jms/client/HornetQTemporaryQueue.java
===================================================================
--- trunk/hornetq-jms/src/main/java/org/hornetq/jms/client/HornetQTemporaryQueue.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/hornetq-jms/src/main/java/org/hornetq/jms/client/HornetQTemporaryQueue.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -13,7 +13,6 @@
package org.hornetq.jms.client;
-import javax.jms.JMSException;
import javax.jms.TemporaryQueue;
Modified: trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/JMSServerManager.java
===================================================================
--- trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/JMSServerManager.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/JMSServerManager.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -18,7 +18,6 @@
import javax.naming.Context;
-import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.security.Role;
import org.hornetq.core.server.HornetQComponent;
Modified: trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java
===================================================================
--- trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/hornetq-jms/src/main/java/org/hornetq/jms/server/management/impl/JMSManagementServiceImpl.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -15,7 +15,6 @@
import javax.management.ObjectName;
-import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.management.AddressControl;
import org.hornetq.api.core.management.QueueControl;
import org.hornetq.api.core.management.ResourceNames;
@@ -29,7 +28,6 @@
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.management.ManagementService;
import org.hornetq.jms.client.HornetQConnectionFactory;
-import org.hornetq.jms.client.HornetQDestination;
import org.hornetq.jms.client.HornetQQueue;
import org.hornetq.jms.client.HornetQTopic;
import org.hornetq.jms.management.impl.JMSConnectionFactoryControlImpl;
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -40,8 +40,6 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.remoting.impl.invm.InVMConnector;
import org.hornetq.core.remoting.impl.invm.InVMRegistry;
-import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.NodeManager;
import org.hornetq.core.server.impl.HornetQServerImpl;
import org.hornetq.core.server.impl.InVMNodeManager;
@@ -338,7 +336,7 @@
{
if (live)
{
- return new TransportConfiguration(NettyAcceptorFactory.class.getCanonicalName());
+ return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY);
}
else
{
@@ -347,8 +345,7 @@
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
- return new TransportConfiguration(NettyAcceptorFactory.class.getCanonicalName(),
- server1Params);
+ return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, server1Params);
}
}
@@ -356,7 +353,7 @@
{
if (live)
{
- return new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName());
+ return new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
}
else
{
@@ -365,7 +362,7 @@
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
- return new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName(), server1Params);
+ return new TransportConfiguration(NETTY_CONNECTOR_FACTORY, server1Params);
}
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -13,18 +13,16 @@
package org.hornetq.tests.integration.cluster.util;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import junit.framework.Assert;
-import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.api.core.client.SessionFailureListener;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.cluster.impl.ClusterManagerImpl;
+import org.hornetq.tests.util.CountDownSessionFailureListener;
/**
* A SameProcessHornetQServer
@@ -49,7 +47,7 @@
public void destroy()
{
- //To change body of implemented methods use File | Settings | File Templates.
+ // To change body of implemented methods use File | Settings | File Templates.
}
public void setIdentity(String identity)
@@ -89,24 +87,10 @@
public void crash(boolean waitFailure, ClientSession... sessions) throws Exception
{
- final CountDownLatch latch = new CountDownLatch(sessions.length);
-
- class MyListener implements SessionFailureListener
- {
- public void connectionFailed(final HornetQException me, boolean failedOver)
- {
- log.debug("MyListener.connectionFailed failedOver=" + failedOver, me);
- latch.countDown();
- }
-
- public void beforeReconnect(HornetQException exception)
- {
- log.debug("MyListener.beforeReconnect", exception);
- }
- }
+ CountDownSessionFailureListener listener = new CountDownSessionFailureListener(sessions.length);
for (ClientSession session : sessions)
{
- session.addFailureListener(new MyListener());
+ session.addFailureListener(listener);
}
ClusterManagerImpl clusterManager = (ClusterManagerImpl) server.getClusterManager();
@@ -118,14 +102,11 @@
if (waitFailure)
{
// Wait to be informed of failure
- boolean ok = latch.await(10000, TimeUnit.MILLISECONDS);
- Assert.assertTrue("Failed to stop the server! Latch count is " + latch.getCount(), ok);
+ boolean ok = listener.getLatch().await(10000, TimeUnit.MILLISECONDS);
+ Assert.assertTrue("Failed to stop the server! Latch count is " + listener.getLatch().getCount(), ok);
}
}
- /* (non-Javadoc)
- * @see org.hornetq.tests.integration.cluster.util.TestableServer#getServer()
- */
public HornetQServer getServer()
{
return server;
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/CountDownSessionFailureListener.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/CountDownSessionFailureListener.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/CountDownSessionFailureListener.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -11,9 +11,14 @@
public CountDownSessionFailureListener()
{
- latch = new CountDownLatch(1);
+ this(1);
}
+ public CountDownSessionFailureListener(int n)
+ {
+ latch = new CountDownLatch(n);
+ }
+
public CountDownSessionFailureListener(CountDownLatch latch)
{
this.latch = latch;
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java 2011-11-03 13:41:25 UTC (rev 11652)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java 2011-11-03 13:42:07 UTC (rev 11653)
@@ -27,7 +27,6 @@
*/
public static void createClusterConnectionConf(Configuration configuration, String name, String... connectors)
{
-
List<String> conn = new ArrayList<String>(connectors.length);
for (String iConn : connectors)
{
13 years, 1 month
JBoss hornetq SVN: r11652 - in trunk/hornetq-core/src/main/java/org/hornetq/core: server and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-03 09:41:25 -0400 (Thu, 03 Nov 2011)
New Revision: 11652
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/ServerLocatorImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Delete unused methods
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-11-03 13:41:08 UTC (rev 11651)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-11-03 13:41:25 UTC (rev 11652)
@@ -538,11 +538,6 @@
stopPingingAfterOne = true;
}
- public void resumePinging()
- {
- stopPingingAfterOne = false;
- }
-
// Protected
// ------------------------------------------------------------------------------------
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-03 13:41:08 UTC (rev 11651)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-03 13:41:25 UTC (rev 11652)
@@ -766,7 +766,6 @@
catch (InterruptedException ignore)
{
}
-
}
if (System.currentTimeMillis() > timeout && !receivedTopology && isInitialized())
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java 2011-11-03 13:41:08 UTC (rev 11651)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java 2011-11-03 13:41:25 UTC (rev 11652)
@@ -15,7 +15,6 @@
import java.util.List;
import java.util.Set;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import javax.management.MBeanServer;
@@ -160,8 +159,6 @@
ScheduledExecutorService getScheduledPool();
- ExecutorService getThreadPool();
-
ExecutorFactory getExecutorFactory();
void setGroupingHandler(GroupingHandler groupingHandler);
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-11-03 13:41:08 UTC (rev 11651)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-11-03 13:41:25 UTC (rev 11652)
@@ -378,12 +378,8 @@
started = true;
- HornetQServerImpl.log.info("HornetQ Server version " + getVersion().getFullVersion() +
- " [" +
- nodeManager.getNodeId() +
- "]" +
- (this.identity != null ? " (" + identity : ")") +
- " started");
+ HornetQServerImpl.log.info("HornetQ Server version " + getVersion().getFullVersion() + " [" +
+ nodeManager.getNodeId() + "]" + (this.identity != null ? " (" + identity + ")" : "") + " started");
}
// The activation on fail-back may change the value of isBackup, for that reason we are not using else here
@@ -704,11 +700,6 @@
return scheduledPool;
}
- public ExecutorService getThreadPool()
- {
- return threadPool;
- }
-
public Configuration getConfiguration()
{
return configuration;
13 years, 1 month
JBoss hornetq SVN: r11651 - in trunk: tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/netty and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-03 09:41:08 -0400 (Thu, 03 Nov 2011)
New Revision: 11651
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/netty/NettyConnection.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java
Log:
Delete constructor only used in tests.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/netty/NettyConnection.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/netty/NettyConnection.java 2011-11-03 09:43:12 UTC (rev 11650)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/netty/NettyConnection.java 2011-11-03 13:41:08 UTC (rev 11651)
@@ -68,14 +68,6 @@
// Constructors --------------------------------------------------
- public NettyConnection(final Channel channel,
- final ConnectionLifeCycleListener listener,
- boolean batchingEnabled,
- boolean directDeliver)
- {
- this(null, channel, listener, batchingEnabled, directDeliver);
- }
-
public NettyConnection(final Acceptor acceptor,
final Channel channel,
final ConnectionLifeCycleListener listener,
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java 2011-11-03 09:43:12 UTC (rev 11650)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java 2011-11-03 13:41:08 UTC (rev 11651)
@@ -48,7 +48,7 @@
public void testGetID() throws Exception
{
Channel channel = new SimpleChannel(RandomUtil.randomInt());
- NettyConnection conn = new NettyConnection(channel, new MyListener(), false, false);
+ NettyConnection conn = new NettyConnection(null, channel, new MyListener(), false, false);
Assert.assertEquals(channel.getId().intValue(), conn.getID());
}
@@ -60,7 +60,7 @@
Assert.assertEquals(0, channel.getWritten().size());
- NettyConnection conn = new NettyConnection(channel, new MyListener(), false, false);
+ NettyConnection conn = new NettyConnection(null, channel, new MyListener(), false, false);
conn.write(buff);
Assert.assertEquals(1, channel.getWritten().size());
@@ -69,7 +69,7 @@
public void testCreateBuffer() throws Exception
{
Channel channel = new SimpleChannel(RandomUtil.randomInt());
- NettyConnection conn = new NettyConnection(channel, new MyListener(), false, false);
+ NettyConnection conn = new NettyConnection(null, channel, new MyListener(), false, false);
final int size = 1234;
@@ -235,7 +235,7 @@
{
}
-
+
public void connectionReadyForWrites(Object connectionID, boolean ready)
{
}
13 years, 1 month
JBoss hornetq SVN: r11650 - trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-03 05:43:12 -0400 (Thu, 03 Nov 2011)
New Revision: 11650
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
Avoid timeout exception if closed. Reduce visibility of some method and inner class.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-03 01:20:57 UTC (rev 11649)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-11-03 09:43:12 UTC (rev 11650)
@@ -769,7 +769,7 @@
}
- if (System.currentTimeMillis() > timeout && !receivedTopology)
+ if (System.currentTimeMillis() > timeout && !receivedTopology && isInitialized())
{
throw new HornetQException(HornetQException.CONNECTION_TIMEDOUT,
"Timed out waiting to receive cluster topology. Group:" + discoveryGroup);
@@ -1209,7 +1209,7 @@
doClose(true);
}
- protected void doClose(final boolean sendClose)
+ private void doClose(final boolean sendClose)
{
if (state == STATE.CLOSED)
{
@@ -1417,7 +1417,6 @@
private synchronized void updateArraysAndPairs()
{
- assertOpen();
Collection<TopologyMember> membersCopy = topology.getMembers();
topologyArray =
@@ -1521,7 +1520,7 @@
}
}
- final class StaticConnector implements Serializable
+ private final class StaticConnector implements Serializable
{
private static final long serialVersionUID = 6772279632415242634l;
13 years, 1 month
JBoss hornetq SVN: r11649 - tags.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 21:20:57 -0400 (Wed, 02 Nov 2011)
New Revision: 11649
Added:
tags/HornetQ_2_2_8_EAP_GA/
Log:
tagging a new releaes! Hear the fireworks outside?
13 years, 1 month
JBoss hornetq SVN: r11648 - in branches/Branch_2_2_EAP: hornetq-rest and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 21:18:38 -0400 (Wed, 02 Nov 2011)
New Revision: 11648
Modified:
branches/Branch_2_2_EAP/build-maven.xml
branches/Branch_2_2_EAP/hornetq-rest/pom.xml
branches/Branch_2_2_EAP/src/config/common/hornetq-version.properties
Log:
Version change
Modified: branches/Branch_2_2_EAP/build-maven.xml
===================================================================
--- branches/Branch_2_2_EAP/build-maven.xml 2011-11-03 01:10:33 UTC (rev 11647)
+++ branches/Branch_2_2_EAP/build-maven.xml 2011-11-03 01:18:38 UTC (rev 11648)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.8.EAP.CR3"/>
+ <property name="hornetq.version" value="2.2.8.EAP.GA"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
Modified: branches/Branch_2_2_EAP/hornetq-rest/pom.xml
===================================================================
--- branches/Branch_2_2_EAP/hornetq-rest/pom.xml 2011-11-03 01:10:33 UTC (rev 11647)
+++ branches/Branch_2_2_EAP/hornetq-rest/pom.xml 2011-11-03 01:18:38 UTC (rev 11648)
@@ -10,7 +10,7 @@
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.8.EAP.CR3</hornetq.version>
+ <hornetq.version>2.2.8.EAP.GA</hornetq.version>
</properties>
<licenses>
Modified: branches/Branch_2_2_EAP/src/config/common/hornetq-version.properties
===================================================================
--- branches/Branch_2_2_EAP/src/config/common/hornetq-version.properties 2011-11-03 01:10:33 UTC (rev 11647)
+++ branches/Branch_2_2_EAP/src/config/common/hornetq-version.properties 2011-11-03 01:18:38 UTC (rev 11648)
@@ -1,9 +1,9 @@
-hornetq.version.versionName=HQ_2_2_8_EAP_CR2
+hornetq.version.versionName=HQ_2_2_8_EAP_GA
hornetq.version.majorVersion=2
hornetq.version.minorVersion=2
hornetq.version.microVersion=8
hornetq.version.incrementingVersion=122
-hornetq.version.versionSuffix=CR2
-hornetq.version.versionTag=CR2
+hornetq.version.versionSuffix=GA
+hornetq.version.versionTag=GA
hornetq.netty.version=(a)NETTY.VERSION@
hornetq.version.compatibleVersionList=121,122
13 years, 1 month
JBoss hornetq SVN: r11647 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 21:10:33 -0400 (Wed, 02 Nov 2011)
New Revision: 11647
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Fix on test for solaris
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-11-03 00:36:59 UTC (rev 11646)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-11-03 01:10:33 UTC (rev 11647)
@@ -105,17 +105,33 @@
doTestClientVersionCompatibility(false);
}
- public void testCompatibleClientVersionWithRealConnection() throws Exception
+ public void testCompatibleClientVersionWithRealConnection1() throws Exception
{
assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 1));
+ }
+
+ public void testCompatibleClientVersionWithRealConnection2() throws Exception
+ {
assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 5));
+ }
+
+ public void testCompatibleClientVersionWithRealConnection3() throws Exception
+ {
assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 10));
}
- public void testIncompatibleClientVersionWithRealConnection() throws Exception
+ public void testIncompatibleClientVersionWithRealConnection1() throws Exception
{
assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 0));
+ }
+
+ public void testIncompatibleClientVersionWithRealConnection2() throws Exception
+ {
assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 4));
+ }
+
+ public void testIncompatibleClientVersionWithRealConnection3() throws Exception
+ {
assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 100));
}
13 years, 1 month
JBoss hornetq SVN: r11646 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 20:36:59 -0400 (Wed, 02 Nov 2011)
New Revision: 11646
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Fix on test for solaris
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-11-02 22:48:24 UTC (rev 11645)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-11-03 00:36:59 UTC (rev 11646)
@@ -14,14 +14,10 @@
package org.hornetq.tests.integration.client;
import static org.hornetq.tests.util.RandomUtil.randomString;
-import org.hornetq.tests.util.SpawnedVMSupport;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
@@ -37,12 +33,12 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.version.impl.VersionImpl;
import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.util.SpawnedVMSupport;
import org.hornetq.utils.VersionLoader;
/**
@@ -55,15 +51,19 @@
public class IncompatibleVersionTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(IncompatibleVersionTest.class);
+
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private HornetQServer server;
- private CoreRemotingConnection connection;
private ServerLocator locator;
+ private ClientSessionFactory csf;
+
+ private CoreRemotingConnection connection;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -73,12 +73,13 @@
@Override
protected void setUp() throws Exception
{
+ super.setUp();
server = createServer(false, false);
server.getConfiguration().setConnectionTTLOverride(500);
server.start();
locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY));
- ClientSessionFactory csf = locator.createSessionFactory();
+ csf = locator.createSessionFactory();
connection = csf.getConnection();
}
@@ -86,11 +87,12 @@
@Override
protected void tearDown() throws Exception
{
- connection.destroy();
+ csf.close();
locator.close();
server.stop();
+ super.tearDown();
}
public void testCompatibleClientVersion() throws Exception
@@ -105,18 +107,18 @@
public void testCompatibleClientVersionWithRealConnection() throws Exception
{
- assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",1));
- assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",5));
- assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",10));
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 1));
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 5));
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 10));
}
public void testIncompatibleClientVersionWithRealConnection() throws Exception
{
- assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",0));
- assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",4));
- assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",100));
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 0));
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 4));
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10", 100));
}
-
+
private void doTestClientVersionCompatibility(boolean compatible) throws Exception
{
Channel channel1 = connection.getChannel(1, -1);
@@ -175,61 +177,69 @@
{
String propFileName = "compatibility-test-hornetq-version.properties";
String serverStartedString = "IncompatibleVersionTest---server---started";
-
+
Properties prop = new Properties();
InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream("hornetq-version.properties");
prop.load(in);
prop.setProperty("hornetq.version.compatibleVersionList", verList);
prop.setProperty("hornetq.version.incrementingVersion", Integer.toString(ver));
prop.store(new FileOutputStream("tests/tmpfiles/" + propFileName), null);
-
+
Process server = null;
boolean result = false;
try
{
server = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
- new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ new String[] { "-D" + VersionLoader.VERSION_PROP_FILE_KEY +
+ "=" +
+ propFileName },
"server",
serverStartedString);
Thread.sleep(2000);
-
+
Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
- new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ new String[] { "-D" + VersionLoader.VERSION_PROP_FILE_KEY +
+ "=" +
+ propFileName },
"client");
-
- if(client.waitFor() == 0)
+
+ if (client.waitFor() == 0)
{
result = true;
}
}
finally
{
- if(server != null)
+ if (server != null)
{
try
{
server.destroy();
}
- catch(Throwable t) {/* ignore */}
+ catch (Throwable t)
+ {/* ignore */
+ }
}
}
-
+
return result;
}
-
+
private static class ServerStarter
{
public void perform(String startedString) throws Exception
{
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(false);
- conf.getAcceptorConfigurations().add(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory"));
+ conf.getAcceptorConfigurations()
+ .add(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory"));
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
server.start();
-
+
log.info("### server: " + startedString);
}
}
+
private static class ClientStarter
{
public void perform() throws Exception
@@ -243,15 +253,15 @@
locator.close();
}
}
-
+
public static void main(String[] args) throws Exception
{
- if(args[0].equals("server"))
+ if (args[0].equals("server"))
{
ServerStarter ss = new ServerStarter();
ss.perform(args[1]);
}
- else if(args[0].equals("client"))
+ else if (args[0].equals("client"))
{
ClientStarter cs = new ClientStarter();
cs.perform();
@@ -261,7 +271,7 @@
throw new Exception("args[0] must be \"server\" or \"client\"");
}
}
-
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
13 years, 1 month
JBoss hornetq SVN: r11645 - in branches/Branch_2_2_EAP/tests/src/org/hornetq/tests: util and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 18:48:24 -0400 (Wed, 02 Nov 2011)
New Revision: 11645
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
oops.. fixing tests after a dumb mistake of mine
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java 2011-11-02 21:04:13 UTC (rev 11644)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java 2011-11-02 22:48:24 UTC (rev 11645)
@@ -127,20 +127,15 @@
{
try
{
- int start = 4;
- int end = 8;
+ int start = Integer.parseInt(arg[1]);
- if (arg.length > 0)
- {
- start = Integer.parseInt(arg[0]);
- }
+ int end = Integer.parseInt(arg[2]);
+
+ long timeStart = Long.parseLong(arg[0]);
- if (arg.length > 1)
- {
- end = Integer.parseInt(arg[1]);
- }
-
JournalCrashTest restart = new JournalCrashTest();
+
+ restart.setTimeStart(timeStart);
restart.startServer();
@@ -196,10 +191,10 @@
public void testRestartJournal() throws Throwable
{
- runExternalProcess(0, JournalCrashTest.FIRST_RUN);
- runExternalProcess(JournalCrashTest.FIRST_RUN, JournalCrashTest.SECOND_RUN);
- runExternalProcess(JournalCrashTest.SECOND_RUN, JournalCrashTest.THIRD_RUN);
- runExternalProcess(JournalCrashTest.THIRD_RUN, JournalCrashTest.FOURTH_RUN);
+ runExternalProcess(getTimeStart(), 0, JournalCrashTest.FIRST_RUN);
+ runExternalProcess(getTimeStart(), JournalCrashTest.FIRST_RUN, JournalCrashTest.SECOND_RUN);
+ runExternalProcess(getTimeStart(), JournalCrashTest.SECOND_RUN, JournalCrashTest.THIRD_RUN);
+ runExternalProcess(getTimeStart(), JournalCrashTest.THIRD_RUN, JournalCrashTest.FOURTH_RUN);
printJournal();
@@ -241,7 +236,7 @@
* @throws Exception
* @throws InterruptedException
*/
- private void runExternalProcess(final int start, final int end) throws Exception, InterruptedException
+ private void runExternalProcess(final long timeStart, final int start, final int end) throws Exception, InterruptedException
{
System.err.println("running external process...");
Process process = SpawnedVMSupport.spawnVM(this.getClass().getCanonicalName(),
@@ -249,6 +244,7 @@
new String[] {},
true,
true,
+ Long.toString(timeStart),
Integer.toString(start),
Integer.toString(end));
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-11-02 21:04:13 UTC (rev 11644)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-11-02 22:48:24 UTC (rev 11645)
@@ -113,7 +113,20 @@
private final String baseDir = System.getProperty("java.io.tmpdir", "/tmp") + File.separator + "hornetq-unit-test";
- private final String testDir = baseDir + File.separator + System.currentTimeMillis();
+ private long timeStart = System.currentTimeMillis();
+
+ public long getTimeStart()
+ {
+ return timeStart;
+ }
+
+ private String testDir = baseDir + File.separator + timeStart;
+
+ public void setTimeStart(long time)
+ {
+ timeStart = time;
+ testDir = baseDir + File.separator + timeStart;
+ }
// There is a verification about thread leakages. We only fail a single thread when this happens
private static Set<Thread> alreadyFailedThread = new HashSet<Thread>();
@@ -899,7 +912,7 @@
OperationContextImpl.clearContext();
- deleteDirectory(new File(baseDir));
+ clearData(getTestDir());
InVMRegistry.instance.clear();
13 years, 1 month
JBoss hornetq SVN: r11644 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-02 17:04:13 -0400 (Wed, 02 Nov 2011)
New Revision: 11644
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
Log:
Just adding some debug just in case
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-11-02 20:51:25 UTC (rev 11643)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/CoreProtocolManager.java 2011-11-02 21:04:13 UTC (rev 11644)
@@ -39,6 +39,7 @@
import org.hornetq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2;
import org.hornetq.core.remoting.CloseListener;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.cluster.ClusterConnection;
import org.hornetq.spi.core.protocol.ConnectionEntry;
import org.hornetq.spi.core.protocol.ProtocolManager;
import org.hornetq.spi.core.protocol.RemotingConnection;
@@ -208,8 +209,23 @@
{
log.trace("Server " + server + " receiving nodeUp from NodeID=" + msg.getNodeID() + ", pair=" + pair);
}
-
- acceptorUsed.getClusterConnection().nodeAnnounced(msg.getCurrentEventID(), msg.getNodeID(), pair, msg.isBackup());
+
+ if (acceptorUsed != null)
+ {
+ ClusterConnection clusterConn = acceptorUsed.getClusterConnection();
+ if (clusterConn != null)
+ {
+ clusterConn.nodeAnnounced(msg.getCurrentEventID(), msg.getNodeID(), pair, msg.isBackup());
+ }
+ else
+ {
+ log.debug("Cluster connection is null on acceptor = " + acceptorUsed);
+ }
+ }
+ else
+ {
+ log.debug("there is no acceptor used configured at the CoreProtocolManager " + this);
+ }
}
}
});
13 years, 1 month