[hornetq-commits] JBoss hornetq SVN: r10553 - in trunk/hornetq-rest: hornetq-rest and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Apr 25 17:01:22 EDT 2011


Author: bill.burke at jboss.com
Date: 2011-04-25 17:01:22 -0400 (Mon, 25 Apr 2011)
New Revision: 10553

Modified:
   trunk/hornetq-rest/hornetq-rest-all.iml
   trunk/hornetq-rest/hornetq-rest/hornetq-rest.iml
   trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java
   trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java
   trunk/hornetq-rest/pom.xml
Log:
stupid push error

Modified: trunk/hornetq-rest/hornetq-rest/hornetq-rest.iml
===================================================================
--- trunk/hornetq-rest/hornetq-rest/hornetq-rest.iml	2011-04-22 15:15:21 UTC (rev 10552)
+++ trunk/hornetq-rest/hornetq-rest/hornetq-rest.iml	2011-04-25 21:01:22 UTC (rev 10553)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/../target/classes" />
-    <output-test url="file://$MODULE_DIR$/../target/test-classes" />
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
@@ -11,7 +11,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="hornetq-core" scope="PROVIDED" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.hornetq:hornetq-core:2.2.3-SNAPSHOT" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.netty:netty:3.2.3.Final" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-jaxrs:2.1.0.GA" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:jaxrs-api:2.1.0.GA" level="project" />
@@ -29,7 +29,7 @@
     <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.6.3" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.jackson:jackson-jaxrs:1.6.3" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.jackson:jackson-xc:1.6.3" level="project" />
-    <orderEntry type="module" module-name="hornetq-jms" scope="PROVIDED" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.hornetq:hornetq-jms:2.2.3-SNAPSHOT" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.javaee:jboss-jms-api:1.1.0.GA" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.javaee:jboss-transaction-api:1.0.1.GA" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: jboss.jbossts:jbossjts:4.6.1.GA" level="project" />

Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java	2011-04-22 15:15:21 UTC (rev 10552)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java	2011-04-25 21:01:22 UTC (rev 10553)
@@ -129,17 +129,13 @@
    {
       boolean acknowledge = strategy.push(clientMessage);
 
-      if (registration.isDisableOnFailure())
-      {
-         log.error("Failed to push message to "+ registration.getTarget() + " disabling push registration...");
-         disableFromFailure();
-      }
       if (acknowledge)
       {
          try
          {
             log.debug("Acknowledging: " + clientMessage.getMessageID());
             clientMessage.acknowledge();
+            return;
          }
          catch (HornetQException e)
          {
@@ -148,8 +144,14 @@
       }
       else
       {
+         if (registration.isDisableOnFailure())
+         {
+            log.error("Failed to push message to " + registration.getTarget() + " disabling push registration...");
+            disableFromFailure();
+            return;
+         }
          // let hornetq decide what to do
-         throw new RuntimeException("Failed to push message to "+ registration.getTarget());
+         throw new RuntimeException("Failed to push message to " + registration.getTarget());
       }
    }
 }

Modified: trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java	2011-04-22 15:15:21 UTC (rev 10552)
+++ trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java	2011-04-25 21:01:22 UTC (rev 10553)
@@ -87,6 +87,7 @@
 
       PushRegistration reg = new PushRegistration();
       reg.setDurable(true);
+      reg.setDisableOnFailure(true);
       XmlLink target = new XmlLink();
       target.setHref(generateURL("/queues/forwardQueue"));
       target.setRelationship("destination");

Modified: trunk/hornetq-rest/hornetq-rest-all.iml
===================================================================
--- trunk/hornetq-rest/hornetq-rest-all.iml	2011-04-22 15:15:21 UTC (rev 10552)
+++ trunk/hornetq-rest/hornetq-rest-all.iml	2011-04-25 21:01:22 UTC (rev 10553)
@@ -5,8 +5,6 @@
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/classes" />
-      <excludeFolder url="file://$MODULE_DIR$/${project.build.directory}/test-classes" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />

Modified: trunk/hornetq-rest/pom.xml
===================================================================
--- trunk/hornetq-rest/pom.xml	2011-04-22 15:15:21 UTC (rev 10552)
+++ trunk/hornetq-rest/pom.xml	2011-04-25 21:01:22 UTC (rev 10553)
@@ -2,11 +2,11 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-   <parent>
-      <groupId>org.hornetq</groupId>
-      <artifactId>hornetq-pom</artifactId>
-      <version>2.2.3-SNAPSHOT</version>
-   </parent>
+    <parent>
+        <groupId>org.hornetq</groupId>
+        <artifactId>hornetq-pom</artifactId>
+        <version>2.2.3-SNAPSHOT</version>
+    </parent>
 
     <name>HornetQ REST Interface Parent POM</name>
     <groupId>org.hornetq.rest</groupId>
@@ -16,6 +16,7 @@
 
     <properties>
         <resteasy.version>2.1.0.GA</resteasy.version>
+        <!--- test -->
         <hornetq.version>${project.version}</hornetq.version>
     </properties>
 
@@ -36,7 +37,7 @@
     </distributionManagement>
 
     <modules>
-       <module>hornetq-rest</module>
+        <module>hornetq-rest</module>
     </modules>
 
     <dependencyManagement>



More information about the hornetq-commits mailing list