Permalink
Browse files

retagging 2.2.8

  • Loading branch information...
clebertsuconic committed Dec 9, 2011
2 parents 5a588f2 + 8585fbb commit f07d9916af09861466e760945cd8041cc82a5049
Showing with 1,329 additions and 186 deletions.
  1. +1 −1 .classpath
  2. +10 −6 build-maven.xml
  3. +10 −0 docs/user-manual/en/clusters.xml
  4. +2 −1 src/config/jboss-as-4/clustered/hornetq-configuration.xml
  5. +2 −1 src/config/jboss-as-4/non-clustered/hornetq-configuration.xml
  6. +2 −1 src/config/jboss-as-5/clustered/hornetq-configuration.xml
  7. +2 −1 src/config/jboss-as-5/non-clustered/hornetq-configuration.xml
  8. +2 −1 src/config/jboss-as-6/clustered/hornetq-configuration.xml
  9. +2 −1 src/config/jboss-as-6/non-clustered/hornetq-configuration.xml
  10. +5 −5 src/config/ra.xml
  11. +4 −0 src/main/org/hornetq/api/core/management/ClusterConnectionControl.java
  12. +4 −0 src/main/org/hornetq/api/jms/management/JMSQueueControl.java
  13. +6 −2 src/main/org/hornetq/api/jms/management/TopicControl.java
  14. +48 −26 src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
  15. +16 −7 src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
  16. +75 −32 src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
  17. +2 −1 src/main/org/hornetq/core/client/impl/ClientSessionInternal.java
  18. +5 −0 src/main/org/hornetq/core/client/impl/DelegatingSession.java
  19. +36 −13 src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
  20. +5 −0 src/main/org/hornetq/core/client/impl/Topology.java
  21. +26 −0 src/main/org/hornetq/core/config/BridgeConfiguration.java
  22. +12 −0 src/main/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java
  23. +9 −1 src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
  24. +9 −0 src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
  25. +6 −0 src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
  26. +24 −6 src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
  27. +4 −0 src/main/org/hornetq/core/server/impl/QueueImpl.java
  28. +65 −20 src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java
  29. +25 −13 src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
  30. +9 −1 src/main/org/hornetq/integration/spring/SpringBindingRegistry.java
  31. +5 −0 src/main/org/hornetq/jms/management/impl/JMSQueueControlImpl.java
  32. +10 −0 src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
  33. +24 −1 src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
  34. +2 −2 src/main/org/hornetq/ra/HornetQRAConnectionMetaData.java
  35. +7 −0 src/main/org/hornetq/ra/inflow/HornetQActivation.java
  36. +39 −4 tests/src/org/hornetq/tests/integration/InterceptorTest.java
  37. +110 −1 tests/src/org/hornetq/tests/integration/client/AcknowledgeTest.java
  38. +3 −0 tests/src/org/hornetq/tests/integration/client/InterruptedLargeMessageTest.java
  39. +7 −0 tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java
  40. +1 −1 tests/src/org/hornetq/tests/integration/client/PagingTest.java
  41. +20 −24 tests/src/org/hornetq/tests/integration/client/RedeliveryConsumerTest.java
  42. +1 −1 tests/src/org/hornetq/tests/integration/clientcrash/ClientCrashTest.java
  43. +221 −0 tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
  44. +10 −1 tests/src/org/hornetq/tests/integration/cluster/distribution/OneWayChainClusterTest.java
  45. +357 −1 tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
  46. +6 −0 tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverTestBase.java
  47. +6 −0 tests/src/org/hornetq/tests/integration/cluster/util/InVMNodeManager.java
  48. +11 −4 tests/src/org/hornetq/tests/integration/jms/client/StoreConfigTest.java
  49. +19 −1 tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
  50. +6 −0 tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java
  51. +5 −0 tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlUsingCoreTest.java
  52. +3 −2 tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java
  53. +5 −0 tests/src/org/hornetq/tests/integration/spring/ExampleListener.java
  54. +6 −1 tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java
  55. +10 −2 tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
  56. +7 −0 tests/src/org/hornetq/tests/util/UnitTestCase.java
View
@@ -113,7 +113,7 @@
<classpathentry kind="lib" path="thirdparty/org/jboss/integration/lib/jboss-transaction-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/javaee/lib/jboss-jaspi-api.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/javaee/lib/jboss-jca-api.jar"/>
- <classpathentry kind="lib" path="thirdparty/org/jboss/javaee/lib/jboss-jms-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/org/jboss/javaee/lib/jboss-jms-api.jar" sourcepath="/Users/clebertsuconic/.m2/repository/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/javaee/lib/jboss-transaction-api.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/lib/jboss-common-core.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/lib/jboss-mdr.jar"/>
View
@@ -17,6 +17,10 @@
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
+ <condition property="maven.executable" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+
<target name="uploadHornetQBootstrap">
<antcall target="upload">
<param name="artifact.id" value="hornetq-bootstrap"/>
@@ -162,7 +166,7 @@
<target name="upload-local-target">
<!-- install the jar -->
- <exec executable="mvn" dir="./build">
+ <exec executable="${maven.executable}" dir="./build">
<arg value="install:install-file"/>
<!-- uncomment the following line to deploy to the JBoss 5 repository -->
<!-- <arg value="-Dmaven.repo.local=/work/eap-51/maven-repository"/> -->
@@ -173,7 +177,7 @@
<arg value="-Dfile=./jars/${file-name}.jar"/>
</exec>
<!-- install the sources jar -->
- <exec executable="mvn" dir="./build">
+ <exec executable="${maven.executable}" dir="./build">
<arg value="install:install-file"/>
<arg value="-DgroupId=org.hornetq"/>
<!-- uncomment the following line to deploy to the JBoss 5 repository -->
@@ -188,7 +192,7 @@
<target name="upload">
<!-- upload the jar -->
- <exec executable="mvn">
+ <exec executable="${maven.executable}">
<arg value="deploy:deploy-file"/>
<arg value="-e"/>
<arg value="-DgroupId=org.hornetq"/>
@@ -201,7 +205,7 @@
<arg value="-Durl=dav:https://snapshots.jboss.org/maven2"/>
</exec>
<!-- upload the corresponding sources jar -->
- <exec executable="mvn">
+ <exec executable="${maven.executable}">
<arg value="deploy:deploy-file"/>
<arg value="-e"/>
<arg value="-DgroupId=org.hornetq"/>
@@ -283,7 +287,7 @@
&lt;version&gt;${hornetq.version}&lt;/version&gt;${line.separator}&lt;/project&gt;"/>
<!-- deploy the jar -->
- <exec executable="mvn">
+ <exec executable="${maven.executable}">
<arg value="-e"/>
<arg value="deploy:deploy-file"/>
<arg value="-DpomFile=${temporary.pom}"/>
@@ -296,7 +300,7 @@
<arg value="-Durl=https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/"/>
</exec>
<!-- deploy the sources jar -->
- <exec executable="mvn">
+ <exec executable="${maven.executable}">
<arg value="-e"/>
<arg value="deploy:deploy-file"/>
<arg value="-DpomFile=${temporary.pom}"/>
@@ -510,6 +510,16 @@ ClientSession session = factory.createSession();
<para>This parameter is optional, the default value is <literal
>false</literal>.</para>
</listitem>
+ <listitem>
+ <para><literal>min-large-message-size</literal>. This parameters determines when a
+ message should be splitted with multiple packages when sent over the cluster.</para>
+ <para>This parameter is optional and its default is at 100K.</para>
+ </listitem>
+ <listitem>
+ <para><literal>reconnect-attempts"</literal>.The number of times the system will
+ try to connect a node on the cluster. If the max-retry is achieved this node will be considered permanently down and the system will stop routing messages to this node.</para>
+ <para>This parameter is optional and its default is at -1 (infinite retries).</para>
+ </listitem>
<listitem>
<para><literal>max-hops</literal>. When a cluster connection decides the set of
nodes to which it might load balance a message, those nodes do not have to
@@ -116,10 +116,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
@@ -89,10 +89,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
@@ -116,10 +116,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
@@ -89,10 +89,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
@@ -116,10 +116,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
@@ -89,10 +89,11 @@
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>60000</redelivery-delay>
+ <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
+ <redistribution-delay>60000</redistribution-delay>
</address-setting>
</address-settings>
View
@@ -8,8 +8,8 @@
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
version="1.5">
- <description>HornetQ 2.0 Resource Adapter</description>
- <display-name>HornetQ 2.0 Resource Adapter</display-name>
+ <description>HornetQ 2.2 Resource Adapter</description>
+ <display-name>HornetQ 2.2 Resource Adapter</display-name>
<vendor-name>Red Hat Middleware LLC</vendor-name>
<eis-type>JMS 1.1 Server</eis-type>
@@ -246,19 +246,19 @@ Copyright 2009 Red Hat, Inc.
<config-property>
<description>whether to use jndi for looking up destinations etc</description>
<config-property-name>UseJNDI</config-property-name>
- <config-property-type>boolean</config-property-type>
+ <config-property-type>java.lang.Boolean</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>how long in milliseconds to wait before retry on failed MDB setup</description>
<config-property-name>SetupInterval</config-property-name>
- <config-property-type>long</config-property-type>
+ <config-property-type>java.lang.Long</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>How many attempts should be made when connecting the MDB</description>
<config-property-name>SetupAttempts</config-property-name>
- <config-property-type>int</config-property-type>
+ <config-property-type>java.lang.Integer</config-property-type>
<config-property-value></config-property-value>
</config-property>-->
@@ -48,6 +48,10 @@
*/
boolean isForwardWhenNoConsumers();
+ /**
+ * Return the Topology that this Cluster Connection knows about
+ */
+ String getTopology();
/**
* Returns the maximum number of hops used by this cluster connection.
*/
@@ -77,6 +77,10 @@
*/
@Operation(desc = "Adds the queue to another JNDI binding")
void addJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception;
+
+ @Operation(desc = "Adds the queue to another JNDI binding")
+ void removeJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception;
+
/**
* Lists all the JMS messages in this queue matching the specified filter.
@@ -13,7 +13,6 @@
package org.hornetq.api.jms.management;
-import java.util.List;
import java.util.Map;
import javax.management.MBeanOperationInfo;
@@ -64,8 +63,13 @@
/**
* Add the JNDI binding to this destination
*/
- @Operation(desc = "Adds the queue to another JNDI binding")
+ @Operation(desc = "Add the queue to another JNDI binding")
void addJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception;
+
+ @Operation(desc = "Add the queue to another JNDI binding")
+ void removeJNDI(@Parameter(name = "jndiBinding", desc = "the name of the binding for JNDI") String jndi) throws Exception;
+
+
@@ -104,6 +104,8 @@
private volatile boolean closed;
private volatile int creditsToSend;
+
+ private volatile boolean failedOver;
private volatile Exception lastException;
@@ -165,7 +167,7 @@ public ClientConsumerImpl(final ClientSessionInternal session,
// ClientConsumer implementation
// -----------------------------------------------------------------
- private ClientMessage receive(long timeout, final boolean forcingDelivery) throws HornetQException
+ private ClientMessage receive(final long timeout, final boolean forcingDelivery) throws HornetQException
{
checkClosed();
@@ -194,17 +196,14 @@ private ClientMessage receive(long timeout, final boolean forcingDelivery) throw
receiverThread = Thread.currentThread();
- if (timeout == 0)
- {
- // Effectively infinite
- timeout = Long.MAX_VALUE;
- }
-
+ // To verify if deliveryForced was already call
boolean deliveryForced = false;
+ // To control when to call deliveryForce
+ boolean callForceDelivery = false;
long start = -1;
- long toWait = timeout;
+ long toWait = timeout == 0 ? Long.MAX_VALUE : timeout;
try
{
@@ -231,13 +230,8 @@ private ClientMessage receive(long timeout, final boolean forcingDelivery) throw
// we only force delivery once per call to receive
if (!deliveryForced)
{
- if (isTrace)
- {
- log.trace("Forcing delivery");
- }
- session.forceDelivery(id, forceDeliveryCount++);
-
- deliveryForced = true;
+ callForceDelivery = true;
+ break;
}
}
@@ -262,6 +256,35 @@ private ClientMessage receive(long timeout, final boolean forcingDelivery) throw
}
}
+ if (failedOver)
+ {
+ if (m == null)
+ {
+ // if failed over and the buffer is null, we reset the state and try it again
+ failedOver = false;
+ deliveryForced = false;
+ toWait = timeout == 0 ? Long.MAX_VALUE : timeout;
+ continue;
+ }
+ else
+ {
+ failedOver = false;
+ }
+ }
+
+ if (callForceDelivery)
+ {
+ if (isTrace)
+ {
+ log.trace("Forcing delivery");
+ }
+ // JBPAPP-6030 - Calling forceDelivery outside of the lock to avoid distributed dead locks
+ session.forceDelivery(id, forceDeliveryCount++);
+ callForceDelivery = false;
+ deliveryForced = true;
+ continue;
+ }
+
if (m != null)
{
session.workDone();
@@ -351,19 +374,14 @@ private ClientMessage receive(long timeout, final boolean forcingDelivery) throw
public ClientMessage receive(final long timeout) throws HornetQException
{
- if (isBrowseOnly())
- {
- ClientMessage msg = receive(timeout, false);
- if (msg == null)
- {
- msg = receive(0, true);
- }
- return msg;
- }
- else
+ ClientMessage msg = receive(timeout, false);
+
+ if (msg == null && !closed)
{
- return receive(timeout, false);
+ msg = receive(0, true);
}
+
+ return msg;
}
public ClientMessage receive() throws HornetQException
@@ -465,6 +483,8 @@ public void clearAtFailover()
lastAckedMessage = null;
creditsToSend = 0;
+
+ failedOver = true;
ackIndividually = false;
}
@@ -887,6 +907,8 @@ private void callOnMessage() throws Exception
{
rateLimiter.limit();
}
+
+ failedOver = false;
synchronized (this)
{
Oops, something went wrong.

0 comments on commit f07d991

Please sign in to comment.