JBoss hornetq SVN: r10861 - in branches/Branch_2_2_AS7: docs and 10 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-06-20 14:01:14 -0400 (Mon, 20 Jun 2011)
New Revision: 10861
Modified:
branches/Branch_2_2_AS7/build-maven.xml
branches/Branch_2_2_AS7/docs/README.html
branches/Branch_2_2_AS7/hornetq-rest/docbook/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/docbook/reference/en/master.xml
branches/Branch_2_2_AS7/hornetq-rest/examples/dup-send/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/examples/javascript-chat/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/examples/jms-to-rest/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/examples/push/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/hornetq-rest/pom.xml
branches/Branch_2_2_AS7/hornetq-rest/pom.xml
branches/Branch_2_2_AS7/src/config/common/hornetq-version.properties
branches/Branch_2_2_AS7/src/main/org/hornetq/ra/HornetQRAConnectionMetaData.java
Log:
updated versioning 2. 2.2.6.Final
Modified: branches/Branch_2_2_AS7/build-maven.xml
===================================================================
--- branches/Branch_2_2_AS7/build-maven.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/build-maven.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.5.Final"/>
+ <property name="hornetq.version" value="2.2.6.Final"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
Modified: branches/Branch_2_2_AS7/docs/README.html
===================================================================
--- branches/Branch_2_2_AS7/docs/README.html 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/docs/README.html 2011-06-20 18:01:14 UTC (rev 10861)
@@ -3,20 +3,20 @@
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
- <title>HornetQ 2.2.5 Final Release Notes</title>
+ <title>HornetQ 2.2.6 Final Release Notes</title>
</head>
<body>
-<h1>Release Notes - HornetQ - Version 2.2.5 Final</h1>
+<h1>Release Notes - HornetQ - Version 2.2.6 Final</h1>
<br>
-<h2>17th June 2010</h2>
+<h2>20th June 2010</h2>
-These are the release notes for HornetQ 2.2.5 Final<br><br>
+These are the release notes for HornetQ 2.2.6 Final<br><br>
For full description of the contents please see the
-<a href="https://issues.jboss.org/secure/ReleaseNote.jspa?atl_token=AQZJ-FV3A-N91S...">HornetQ project JIRA</a>.<br><br>
+<a href="https://issues.jboss.org/secure/ReleaseNote.jspa?atl_token=AQZJ-FV3A-N91S...">HornetQ project JIRA</a>.<br><br>
This release contains minor fixes required for the Application Server 7 integration.
Modified: branches/Branch_2_2_AS7/hornetq-rest/docbook/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/docbook/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/docbook/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -6,7 +6,7 @@
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-reference-guide-${translation}</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
<packaging>jdocbook</packaging>
<name>HornetQ REST Interface Reference Guide (${translation})</name>
<repositories>
Modified: branches/Branch_2_2_AS7/hornetq-rest/docbook/reference/en/master.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/docbook/reference/en/master.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/docbook/reference/en/master.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -5,7 +5,7 @@
<bookinfo>
<title>HornetQ REST Interface</title>
- <releaseinfo>2.2.5.Final</releaseinfo>
+ <releaseinfo>2.2.6.Final</releaseinfo>
</bookinfo>
<toc></toc>
@@ -172,7 +172,7 @@
<dependency>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
</dependency>
</dependencies>
</project>
@@ -272,7 +272,7 @@
<dependency>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
Modified: branches/Branch_2_2_AS7/hornetq-rest/examples/dup-send/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/examples/dup-send/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/examples/dup-send/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>dup-send</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
<packaging>war</packaging>
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.5.Final</hornetq.version>
+ <hornetq.version>2.2.6.Final</hornetq.version>
</properties>
<name>Duplicate Send Demo</name>
<repositories>
Modified: branches/Branch_2_2_AS7/hornetq-rest/examples/javascript-chat/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/examples/javascript-chat/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/examples/javascript-chat/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>javascript-chat</artifactId>
- <version>2.2.0.CR1</version>
+ <version>2.2.6.Final</version>
<packaging>war</packaging>
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.5.Final</hornetq.version>
+ <hornetq.version>2.2.6.Final</hornetq.version>
</properties>
<name>Browser Chat App</name>
<repositories>
Modified: branches/Branch_2_2_AS7/hornetq-rest/examples/jms-to-rest/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/examples/jms-to-rest/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/examples/jms-to-rest/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>mixed-jms-rest</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
<packaging>war</packaging>
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.5.Final</hornetq.version>
+ <hornetq.version>2.2.6.Final</hornetq.version>
</properties>
<name>Mixed JMS and REST Producers/Consumers</name>
<repositories>
Modified: branches/Branch_2_2_AS7/hornetq-rest/examples/push/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/examples/push/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/examples/push/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -7,7 +7,7 @@
<packaging>war</packaging>
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.5.Final</hornetq.version>
+ <hornetq.version>2.2.6.Final</hornetq.version>
</properties>
<name>Push Subscriptions</name>
<repositories>
Modified: branches/Branch_2_2_AS7/hornetq-rest/hornetq-rest/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/hornetq-rest/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/hornetq-rest/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-all</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
</parent>
<groupId>org.hornetq.rest</groupId>
Modified: branches/Branch_2_2_AS7/hornetq-rest/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/pom.xml 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/hornetq-rest/pom.xml 2011-06-20 18:01:14 UTC (rev 10861)
@@ -5,12 +5,12 @@
<name>HornetQ REST Interface Parent POM</name>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-all</artifactId>
- <version>2.2.5.Final</version>
+ <version>2.2.6.Final</version>
<packaging>pom</packaging>
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.5.Final</hornetq.version>
+ <hornetq.version>2.2.6.Final</hornetq.version>
</properties>
<licenses>
Modified: branches/Branch_2_2_AS7/src/config/common/hornetq-version.properties
===================================================================
--- branches/Branch_2_2_AS7/src/config/common/hornetq-version.properties 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/src/config/common/hornetq-version.properties 2011-06-20 18:01:14 UTC (rev 10861)
@@ -1,7 +1,7 @@
-hornetq.version.versionName=HQ_2_2_5_FINAL_AS7
+hornetq.version.versionName=HQ_2_2_6_FINAL_AS7
hornetq.version.majorVersion=2
hornetq.version.minorVersion=2
-hornetq.version.microVersion=5
+hornetq.version.microVersion=6
hornetq.version.incrementingVersion=121
hornetq.version.versionSuffix=Final
hornetq.version.versionTag=Final
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/ra/HornetQRAConnectionMetaData.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/ra/HornetQRAConnectionMetaData.java 2011-06-20 17:48:02 UTC (rev 10860)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/ra/HornetQRAConnectionMetaData.java 2011-06-20 18:01:14 UTC (rev 10861)
@@ -113,7 +113,7 @@
HornetQRAConnectionMetaData.log.trace("getJMSProviderName()");
}
- return "2.2.5.Final";
+ return "2.2.6.Final";
}
/**
13 years
JBoss hornetq SVN: r10860 - in branches/Branch_2_2_AS7/src/main/org/hornetq: core/logging and 6 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-06-20 13:48:02 -0400 (Mon, 20 Jun 2011)
New Revision: 10860
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/logging/Logger.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/impl/ssl/SSLSupport.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/ConnectorsService.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/jms/bridge/impl/JMSBridgeImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/utils/ClassloadingUtil.java
branches/Branch_2_2_AS7/src/main/org/hornetq/utils/XMLUtil.java
Log:
https://issues.jboss.org/browse/HORNETQ-681
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -283,8 +283,24 @@
{
throw new IllegalStateException("Please specify a load balancing policy class name on the session factory");
}
-
- loadBalancingPolicy = (ConnectionLoadBalancingPolicy)ClassloadingUtil.safeInitNewInstance(connectionLoadBalancingPolicyClassName);
+
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ try
+ {
+ loadBalancingPolicy = (ConnectionLoadBalancingPolicy) ClassloadingUtil.safeInitNewInstance(connectionLoadBalancingPolicyClassName);
+ return null;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + connectionLoadBalancingPolicyClassName +
+ "\"",
+ e);
+ }
+ }
+ });
}
private synchronized void initialise() throws Exception
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/logging/Logger.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/logging/Logger.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/logging/Logger.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -19,6 +19,7 @@
import org.hornetq.core.logging.impl.JULLogDelegateFactory;
import org.hornetq.spi.core.logging.LogDelegate;
import org.hornetq.spi.core.logging.LogDelegateFactory;
+import org.hornetq.utils.ClassloadingUtil;
/**
*
@@ -80,16 +81,7 @@
if (className != null)
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try
- {
- Class<?> clz = loader.loadClass(className);
- delegateFactory = (LogDelegateFactory)clz.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Error instantiating transformer class \"" + className + "\"", e);
- }
+ delegateFactory = (LogDelegateFactory) ClassloadingUtil.safeInitNewInstance(className);
}
else
{
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/impl/ssl/SSLSupport.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/impl/ssl/SSLSupport.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/impl/ssl/SSLSupport.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -30,6 +30,8 @@
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
+import org.hornetq.utils.ClassloadingUtil;
+
/**
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
*
@@ -185,7 +187,7 @@
}
else
{
- URL url = Thread.currentThread().getContextClassLoader().getResource(storePath);
+ URL url = ClassloadingUtil.findResource(storePath);
if (url != null)
{
return url;
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -50,6 +50,7 @@
import org.hornetq.spi.core.remoting.BufferHandler;
import org.hornetq.spi.core.remoting.Connection;
import org.hornetq.spi.core.remoting.ConnectionLifeCycleListener;
+import org.hornetq.utils.ClassloadingUtil;
import org.hornetq.utils.ConfigurationHelper;
import org.hornetq.utils.HornetQThreadFactory;
@@ -108,13 +109,11 @@
this.server = server;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
for (String interceptorClass : config.getInterceptorClassNames())
{
try
{
- Class<?> clazz = loader.loadClass(interceptorClass);
- interceptors.add((Interceptor)clazz.newInstance());
+ interceptors.add((Interceptor) ClassloadingUtil.safeInitNewInstance(interceptorClass));
}
catch (Exception e)
{
@@ -571,4 +570,4 @@
}
}
-}
\ No newline at end of file
+}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -45,6 +45,7 @@
import org.hornetq.core.server.cluster.ClusterManager;
import org.hornetq.core.server.cluster.Transformer;
import org.hornetq.core.server.management.ManagementService;
+import org.hornetq.utils.ClassloadingUtil;
import org.hornetq.utils.ConcurrentHashSet;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.UUID;
@@ -880,11 +881,9 @@
if (transformerClassName != null)
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
try
{
- Class<?> clz = loader.loadClass(transformerClassName);
- transformer = (Transformer)clz.newInstance();
+ transformer = (Transformer) ClassloadingUtil.safeInitNewInstance(transformerClassName);
}
catch (Exception e)
{
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/ConnectorsService.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/ConnectorsService.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/ConnectorsService.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -20,6 +20,7 @@
import org.hornetq.core.server.ConnectorService;
import org.hornetq.core.server.ConnectorServiceFactory;
import org.hornetq.core.server.HornetQComponent;
+import org.hornetq.utils.ClassloadingUtil;
import org.hornetq.utils.ConfigurationHelper;
import java.util.HashSet;
@@ -60,16 +61,12 @@
public void start() throws Exception
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
List<ConnectorServiceConfiguration> configurationList = configuration.getConnectorServiceConfigurations();
for (ConnectorServiceConfiguration info : configurationList)
{
- Class<?> clazz = loader.loadClass(info.getFactoryClassName());
+ ConnectorServiceFactory factory = (ConnectorServiceFactory) ClassloadingUtil.safeInitNewInstance(info.getFactoryClassName());
- ConnectorServiceFactory factory = (ConnectorServiceFactory)clazz.newInstance();
-
if (info.getParams() != null)
{
Set<String> invalid = ConfigurationHelper.checkKeys(factory.getAllowableProperties(), info.getParams()
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -116,6 +116,7 @@
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.spi.core.protocol.SessionCallback;
import org.hornetq.spi.core.security.HornetQSecurityManager;
+import org.hornetq.utils.ClassloadingUtil;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.OrderedExecutorFactory;
@@ -1860,18 +1861,7 @@
private Object instantiateInstance(final String className)
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try
- {
- Class<?> clz = loader.loadClass(className);
- Object object = clz.newInstance();
-
- return object;
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Error instantiating class \"" + className + "\"", e);
- }
+ return ClassloadingUtil.safeInitNewInstance(className);
}
private static ClassLoader getThisClassLoader()
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/jms/bridge/impl/JMSBridgeImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/jms/bridge/impl/JMSBridgeImpl.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/jms/bridge/impl/JMSBridgeImpl.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -54,6 +54,7 @@
import org.hornetq.jms.bridge.QualityOfServiceMode;
import org.hornetq.jms.client.HornetQMessage;
import org.hornetq.jms.client.HornetQSession;
+import org.hornetq.utils.ClassloadingUtil;
/**
*
@@ -942,10 +943,8 @@
{
try
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class aClass = loader.loadClass(transactionManagerLocatorClass);
- Object o = aClass.newInstance();
- Method m = aClass.getMethod(transactionManagerLocatorMethod);
+ Object o = ClassloadingUtil.safeInitNewInstance(transactionManagerLocatorClass);
+ Method m = o.getClass().getMethod(transactionManagerLocatorMethod);
tm = (TransactionManager)m.invoke(o);
}
catch (Exception e)
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/utils/ClassloadingUtil.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/utils/ClassloadingUtil.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/utils/ClassloadingUtil.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -1,5 +1,6 @@
package org.hornetq.utils;
+import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -17,22 +18,62 @@
public Object run()
{
ClassLoader loader = ClassloadingUtil.class.getClassLoader();
- if (loader == null)
- {
- loader = Thread.currentThread().getContextClassLoader();
- }
try
{
Class<?> clazz = loader.loadClass(className);
return clazz.newInstance();
}
- catch (Exception e)
+ catch (Throwable t)
{
- throw new IllegalArgumentException("Error instantiating connector factory \"" + className + "\"", e);
+ try
+ {
+ loader = Thread.currentThread().getContextClassLoader();
+ if (loader != null)
+ return loader.loadClass(className).newInstance();
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ }
+
+ throw new IllegalArgumentException("Could not find class " + className);
}
}
});
}
+ public static URL findResource(final String resourceName)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<URL>()
+ {
+ public URL run()
+ {
+ ClassLoader loader = ClassloadingUtil.class.getClassLoader();
+ try
+ {
+ URL resource = loader.getResource(resourceName);
+ if (resource != null)
+ return resource;
+ }
+ catch (Throwable t)
+ {
+ }
+
+ loader = Thread.currentThread().getContextClassLoader();
+ if (loader == null)
+ return null;
+
+ URL resource = loader.getResource(resourceName);
+ if (resource != null)
+ return resource;
+
+ return null;
+ }
+ });
+ }
+
}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/utils/XMLUtil.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/utils/XMLUtil.java 2011-06-20 17:11:13 UTC (rev 10859)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/utils/XMLUtil.java 2011-06-20 17:48:02 UTC (rev 10860)
@@ -481,7 +481,7 @@
{
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Schema schema = factory.newSchema(Thread.currentThread().getContextClassLoader().getResource(schemaFile));
+ Schema schema = factory.newSchema(ClassloadingUtil.findResource(schemaFile));
Validator validator = schema.newValidator();
// validate the DOM tree
13 years
JBoss hornetq SVN: r10859 - trunk/tests/integration-tests.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-20 13:11:13 -0400 (Mon, 20 Jun 2011)
New Revision: 10859
Modified:
trunk/tests/integration-tests/pom.xml
Log:
HORNETQ-720 Re-enable replication tests.
Modified: trunk/tests/integration-tests/pom.xml
===================================================================
--- trunk/tests/integration-tests/pom.xml 2011-06-20 16:45:44 UTC (rev 10858)
+++ trunk/tests/integration-tests/pom.xml 2011-06-20 17:11:13 UTC (rev 10859)
@@ -106,18 +106,7 @@
<excludes>
<exclude>**/ReplicatedJMSFailoverTest.java</exclude>
<exclude>org/hornetq/tests/util/*.java</exclude>
- <!--exclude any replication tests for now -->
- <exclude>**/cluster/failover/*ClusterWithBackupFailoverTestBase.java</exclude>
- <exclude>**/cluster/**/*/java</exclude>
- <exclude>**/cluster/failover/*DiscoveryClusterWithBackupFailoverTest.java</exclude>
- <exclude>**/cluster/failover/*GroupingFailoverReplicationTest.java</exclude>
- <exclude>**/cluster/failover/*Replicated*.java</exclude>
- <exclude>**/cluster/replication/**.java</exclude>
- <exclude>**/cluster/failover/*ReplicatedDistributionTest.java</exclude>
- <exclude>**/cluster/failover/*SharedStoreDistributionTest.java</exclude>
- <exclude>**/cluster/failover/*ReplicatedNettyAsynchronousFailoverTest.java</exclude>
- <exclude>**/cluster/*ReplicatedJMSFailoverTest.java</exclude>
- <exclude>**/integration/replication/*.java</exclude>
+ <!-- exclude some replication tests for now -->
<exclude>**/cluster/failover/Remote*.java</exclude>
<exclude>**/failover/remote/**.java</exclude>
</excludes>
13 years
JBoss hornetq SVN: r10858 - trunk/hornetq-core/src/test/java/org/hornetq/tests/util.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-20 12:45:44 -0400 (Mon, 20 Jun 2011)
New Revision: 10858
Modified:
trunk/hornetq-core/src/test/java/org/hornetq/tests/util/UnitTestCase.java
Log:
Set a server password to avoid spurious warnings during tests.
Modified: trunk/hornetq-core/src/test/java/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- trunk/hornetq-core/src/test/java/org/hornetq/tests/util/UnitTestCase.java 2011-06-20 13:53:11 UTC (rev 10857)
+++ trunk/hornetq-core/src/test/java/org/hornetq/tests/util/UnitTestCase.java 2011-06-20 16:45:44 UTC (rev 10858)
@@ -99,6 +99,8 @@
public static final String NETTY_CONNECTOR_FACTORY = NettyConnectorFactory.class.getCanonicalName();
+ protected static final String CLUSTER_PASSWORD = "HornetQ";
+
// Attributes ----------------------------------------------------
private static final String testDir = System.getProperty("java.io.tmpdir", "/tmp") + "/hornetq-unit-test";
@@ -175,6 +177,7 @@
configuration.setLargeMessagesDirectory(getLargeMessagesDir(serverID, false));
configuration.setJournalCompactMinFiles(0);
configuration.setJournalCompactPercentage(0);
+ configuration.setClusterPassword(CLUSTER_PASSWORD);
return configuration;
}
@@ -203,7 +206,7 @@
TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
configuration.getAcceptorConfigurations().add(transportConfig);
}
-
+ configuration.setClusterPassword(CLUSTER_PASSWORD);
return configuration;
}
13 years
JBoss hornetq SVN: r10857 - branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2011-06-20 09:53:11 -0400 (Mon, 20 Jun 2011)
New Revision: 10857
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
fix another cl issue
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-06-20 11:32:04 UTC (rev 10856)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-06-20 13:53:11 UTC (rev 10857)
@@ -35,6 +35,7 @@
import org.hornetq.core.cluster.DiscoveryListener;
import org.hornetq.core.cluster.impl.DiscoveryGroupImpl;
import org.hornetq.core.logging.Logger;
+import org.hornetq.utils.ClassloadingUtil;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.UUIDGenerator;
@@ -282,26 +283,8 @@
{
throw new IllegalStateException("Please specify a load balancing policy class name on the session factory");
}
-
- AccessController.doPrivileged(new PrivilegedAction<Object>()
- {
- public Object run()
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try
- {
- Class<?> clazz = loader.loadClass(connectionLoadBalancingPolicyClassName);
- loadBalancingPolicy = (ConnectionLoadBalancingPolicy)clazz.newInstance();
- return null;
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Unable to instantiate load balancing policy \"" + connectionLoadBalancingPolicyClassName +
- "\"",
- e);
- }
- }
- });
+
+ loadBalancingPolicy = (ConnectionLoadBalancingPolicy)ClassloadingUtil.safeInitNewInstance(connectionLoadBalancingPolicyClassName);
}
private synchronized void initialise() throws Exception
13 years
JBoss hornetq SVN: r10856 - in trunk/tests: integration-tests and 4 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-06-20 07:32:04 -0400 (Mon, 20 Jun 2011)
New Revision: 10856
Modified:
trunk/tests/concurrent-tests/pom.xml
trunk/tests/integration-tests/pom.xml
trunk/tests/performance-tests/pom.xml
trunk/tests/soak-tests/pom.xml
trunk/tests/stress-tests/pom.xml
trunk/tests/timing-tests/pom.xml
Log:
Fix dependency on test classes moved to hornetq-core/src/tests
Modified: trunk/tests/concurrent-tests/pom.xml
===================================================================
--- trunk/tests/concurrent-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/concurrent-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -20,13 +20,19 @@
<version>2.2.3-SNAPSHOT</version>
</parent>
- <groupId>org.hornetq.tests</groupId>
<artifactId>concurrent-tests</artifactId>
<packaging>jar</packaging>
<name>HornetQ concurrent Tests</name>
<dependencies>
<dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.hornetq.tests</groupId>
<artifactId>unit-tests</artifactId>
<version>${project.version}</version>
Modified: trunk/tests/integration-tests/pom.xml
===================================================================
--- trunk/tests/integration-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/integration-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -30,6 +30,8 @@
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
<version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
Modified: trunk/tests/performance-tests/pom.xml
===================================================================
--- trunk/tests/performance-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/performance-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -20,13 +20,19 @@
<version>2.2.3-SNAPSHOT</version>
</parent>
- <groupId>org.hornetq.tests</groupId>
<artifactId>performance-tests</artifactId>
<packaging>jar</packaging>
<name>HornetQ performance Tests</name>
<dependencies>
<dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.hornetq.tests</groupId>
<artifactId>unit-tests</artifactId>
<version>${project.version}</version>
Modified: trunk/tests/soak-tests/pom.xml
===================================================================
--- trunk/tests/soak-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/soak-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -20,12 +20,18 @@
<version>2.2.3-SNAPSHOT</version>
</parent>
- <groupId>org.hornetq.tests</groupId>
<artifactId>soak-tests</artifactId>
<packaging>jar</packaging>
<name>HornetQ soak Tests</name>
<dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
<dependency>
<groupId>org.hornetq.tests</groupId>
<artifactId>unit-tests</artifactId>
Modified: trunk/tests/stress-tests/pom.xml
===================================================================
--- trunk/tests/stress-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/stress-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -20,13 +20,19 @@
<version>2.2.3-SNAPSHOT</version>
</parent>
- <groupId>org.hornetq.tests</groupId>
<artifactId>stress-tests</artifactId>
<packaging>jar</packaging>
<name>HornetQ stress Tests</name>
<dependencies>
<dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.hornetq.tests</groupId>
<artifactId>unit-tests</artifactId>
<version>${project.version}</version>
Modified: trunk/tests/timing-tests/pom.xml
===================================================================
--- trunk/tests/timing-tests/pom.xml 2011-06-20 07:14:50 UTC (rev 10855)
+++ trunk/tests/timing-tests/pom.xml 2011-06-20 11:32:04 UTC (rev 10856)
@@ -26,6 +26,13 @@
<dependencies>
<dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
<groupId>org.hornetq.tests</groupId>
<artifactId>unit-tests</artifactId>
<version>${project.version}</version>
13 years
JBoss hornetq SVN: r10855 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-06-20 03:14:50 -0400 (Mon, 20 Jun 2011)
New Revision: 10855
Removed:
tags/HornetQ_2_2_5_Final_pending/
Log:
unneeded branch
13 years
JBoss hornetq SVN: r10854 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-06-20 03:11:52 -0400 (Mon, 20 Jun 2011)
New Revision: 10854
Added:
tags/HornetQ_2_2_5_Final/
Log:
2.2.5.Final
13 years
JBoss hornetq SVN: r10853 - in branches/Branch_2_2_EAP_cluster_clean2: src/main/org/hornetq/core/server/cluster/impl and 2 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-20 00:49:56 -0400 (Mon, 20 Jun 2011)
New Revision: 10853
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.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/ServerConsumerImpl.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
Log:
Tweaks for debugging
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/LocalQueueBinding.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -135,6 +135,11 @@
{
return BindingType.LOCAL_QUEUE;
}
+
+ public void close() throws Exception
+ {
+ queue.close();
+ }
/* (non-Javadoc)
* @see java.lang.Object#toString()
@@ -142,12 +147,16 @@
@Override
public String toString()
{
- return "LocalQueueBinding [address=" + address + ", name=" + name + ", filter=" + filter + "]";
+ return "LocalQueueBinding [address=" + address +
+ ", queue=" +
+ queue +
+ ", filter=" +
+ filter +
+ ", name=" +
+ name +
+ ", clusterName=" +
+ clusterName +
+ "]";
}
-
- public void close() throws Exception
- {
- queue.close();
- }
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -470,6 +470,8 @@
}
String uid = UUIDGenerator.getInstance().generateStringUUID();
+
+ System.out.println("Seding notification for addBinding " + binding);
managementService.sendNotification(new Notification(uid, NotificationType.BINDING_ADDED, props));
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionBridge.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -112,6 +112,8 @@
password,
activated,
storageManager);
+
+ System.out.println("ClusterConnectionBridge");
idsHeaderName = MessageImpl.HDR_ROUTE_TO_IDS.concat(name);
@@ -221,6 +223,7 @@
ClientMessage message = session.createMessage(false);
+ System.out.println("Requesting sendQueueInfoToQueue");
ManagementHelper.putOperationInvocation(message,
ResourceNames.CORE_SERVER,
"sendQueueInfoToQueue",
@@ -241,6 +244,7 @@
@Override
protected void afterConnect() throws Exception
{
+ System.out.println("afterConnect");
setupNotificationConsumer();
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -493,7 +493,6 @@
final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
final boolean last)
{
- log.warn(this + " WTF nodeUP nodeID=" + nodeID, new Exception ("trace"));
if (log.isDebugEnabled())
{
log.debug(this + "receiving nodeUP for nodeID=" + nodeID +
@@ -1026,6 +1025,11 @@
{
log.trace("Adding binding " + clusterName + " into " + ClusterConnectionImpl.this);
}
+
+ synchronized (System.err)
+ {
+ new Exception("Adding binding " + clusterName + " into " + ClusterConnectionImpl.this).printStackTrace(System.out);
+ }
bindings.put(clusterName, binding);
@@ -1055,6 +1059,8 @@
}
SimpleString clusterName = message.getSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME);
+
+ System.out.println("Removing clusterName=" + clusterName + " on " + ClusterConnectionImpl.this);
removeBinding(clusterName);
}
@@ -1096,10 +1102,15 @@
SimpleString filterString = message.getSimpleStringProperty(ManagementHelper.HDR_FILTERSTRING);
RemoteQueueBinding binding = bindings.get(clusterName);
+
+ synchronized (System.err)
+ {
+ new Exception("Looking for consumer on " + clusterName + " binding = " + binding).printStackTrace(System.out);
+ }
if (binding == null)
{
- throw new IllegalStateException("Cannot find binding for " + clusterName);
+ throw new IllegalStateException("Cannot find binding for " + clusterName + " on " + ClusterConnectionImpl.this);
}
binding.addConsumer(filterString);
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -262,7 +262,7 @@
// the updateDeliveryCount would still be updated after c
if (strictUpdateDeliveryCount)
{
- if (ref.getMessage().isDurable() && ref.getQueue().isDurable() && !ref.getQueue().isInternalQueue())
+ if (ref.getMessage().isDurable() && ref.getQueue().isDurable() && !ref.getQueue().isInternalQueue() && !ref.isPaged())
{
storageManager.updateDeliveryCount(ref);
}
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -319,7 +319,7 @@
// Sending thread dump into junit report.. trying to get some information about the server case the binding didn't
// arrive
- System.out.println(UnitTestCase.threadDump(msg));
+ // System.out.println(UnitTestCase.threadDump(msg));
Bindings bindings = po.getBindingsForAddress(new SimpleString(address));
@@ -1845,7 +1845,7 @@
* This is to avoid split brain on startup
* */
// TODO: Do we really need this?
- Thread.sleep(500);
+ Thread.sleep(1000);
}
for (int node : nodes)
{
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-18 04:40:18 UTC (rev 10852)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-20 04:49:56 UTC (rev 10853)
@@ -77,7 +77,7 @@
public void tearDown() throws Exception
{
- stopServers(0, 1);
+ stopServers(0, 1, 2);
super.tearDown();
}
@@ -110,16 +110,25 @@
setupSessionFactory(1, isNetty());
setupSessionFactory(2, isNetty());
+ //Thread.sleep(1500);
+
createQueue(0, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
createQueue(1, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
createQueue(2, "queues.testaddress", "queue0", null, false);
+ //Thread.sleep(1500);
addConsumer(0, 0, "queue0", null);
+ //Thread.sleep(1500);
addConsumer(1, 1, "queue0", null);
- addConsumer(2, 1, "queue0", null);
+ //Thread.sleep(1500);
+ addConsumer(2, 2, "queue0", null);
+ //Thread.sleep(1500);
waitForBindings(0, "queues.testaddress", 1, 1, true);
waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
waitForBindings(0, "queues.testaddress", 2, 2, false);
waitForBindings(1, "queues.testaddress", 2, 2, false);
13 years
JBoss hornetq SVN: r10852 - in branches/Branch_2_2_EAP_cluster_clean2: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-06-18 00:40:18 -0400 (Sat, 18 Jun 2011)
New Revision: 10852
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
Log:
tweaks
Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-06-17 16:47:24 UTC (rev 10851)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-06-18 04:40:18 UTC (rev 10852)
@@ -1321,9 +1321,15 @@
private void forceReturnChannel1()
{
- Channel channel1 = connection.getChannel(1, -1);
-
- channel1.returnBlocking();
+ if (connection != null)
+ {
+ Channel channel1 = connection.getChannel(1, -1);
+
+ if (channel1 != null)
+ {
+ channel1.returnBlocking();
+ }
+ }
}
private void checkTransportKeys(final ConnectorFactory factory, final Map<String, Object> params)
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-17 16:47:24 UTC (rev 10851)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-06-18 04:40:18 UTC (rev 10852)
@@ -244,17 +244,17 @@
protected void waitForBindings(final int node,
final String address,
- final int count,
- final int consumerCount,
+ final int expectedBindingCount,
+ final int expectedConsumerCount,
final boolean local) throws Exception
{
log.debug("waiting for bindings on node " + node +
" address " +
address +
- " count " +
- count +
+ " expectedBindingCount " +
+ expectedBindingCount +
" consumerCount " +
- consumerCount +
+ expectedConsumerCount +
" local " +
local);
@@ -285,6 +285,14 @@
{
if (binding instanceof LocalQueueBinding && local || binding instanceof RemoteQueueBinding && !local)
{
+ if (local)
+ {
+ log.debug("found binding " + binding + " on node " + server);
+ }
+ else
+ {
+ log.debug("found remote binding " + binding + " on node " + server);
+ }
QueueBinding qBinding = (QueueBinding)binding;
bindingCount++;
@@ -293,7 +301,7 @@
}
}
- if (bindingCount == count && totConsumers == consumerCount)
+ if (bindingCount == expectedBindingCount && totConsumers == expectedConsumerCount)
{
return;
}
@@ -302,9 +310,9 @@
}
while (System.currentTimeMillis() - start < ClusterTestBase.WAIT_TIMEOUT);
- String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount + " (expecting " + count + ") "+
+ String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount + " (expecting " + expectedConsumerCount + ") "+
", totConsumers = " +
- totConsumers + " (expecting " + consumerCount + ")" +
+ totConsumers + " (expecting " + expectedConsumerCount + ")" +
")";
ClusterTestBase.log.error(msg);
Modified: branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-17 16:47:24 UTC (rev 10851)
+++ branches/Branch_2_2_EAP_cluster_clean2/tests/src/org/hornetq/tests/integration/cluster/distribution/SimpleSymmetricClusterTest.java 2011-06-18 04:40:18 UTC (rev 10852)
@@ -17,6 +17,7 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
+import org.hornetq.core.logging.Logger;
/**
* A SimpleSymmetricClusterTest
@@ -30,6 +31,7 @@
// Constants -----------------------------------------------------
+ static final Logger log = Logger.getLogger(SimpleSymmetricClusterTest.class);
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
@@ -41,13 +43,6 @@
public void setUp() throws Exception
{
super.setUp();
- setupServer(0, true, isNetty());
- setupServer(1, true, isNetty());
-
- setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1);
- setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 0);
-
- startServers(1, 0);
}
@@ -93,7 +88,43 @@
public void testSimple() throws Exception
{
+ setupServer(0, true, isNetty());
+ setupServer(1, true, isNetty());
+ setupServer(2, true, isNetty());
+ setupClusterConnection("cluster0", "queues", false, 1, isNetty(), 0, 1, 2);
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 1, 2, 0);
+ setupClusterConnection("cluster1", "queues", false, 1, isNetty(), 2, 0, 1);
+
+ startServers(0, 1, 2);
+
+ Thread.sleep(1000);
+
+ for (int i = 0; i < 10; i++) log.info("****************************");
+ for (int i = 0; i <= 2; i++)
+ {
+ log.info("*************************************\n " + servers[i] + " topology:\n" + servers[i].getClusterManager().getTopology().describe());
+ }
+ for (int i = 0; i < 10; i++) log.info("****************************");
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 1, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+
}
// Package protected ---------------------------------------------
13 years