[hornetq-commits] JBoss hornetq SVN: r9259 - in trunk: src/main/org/hornetq/ra/inflow and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue May 25 08:15:14 EDT 2010


Author: ataylor
Date: 2010-05-25 08:15:13 -0400 (Tue, 25 May 2010)
New Revision: 9259

Modified:
   trunk/pom.xml
   trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
Log:
updated pom and log message in RA

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2010-05-25 11:44:05 UTC (rev 9258)
+++ trunk/pom.xml	2010-05-25 12:15:13 UTC (rev 9259)
@@ -19,7 +19,7 @@
    <groupId>org.hornetq</groupId>
    <artifactId>messaging</artifactId>
    <packaging>pom</packaging>
-   <version>2.0.0.CR3</version>
+   <version>2.0.0.CR1</version>
 
    <name>HornetQ</name>
    <url>http://hornetq.org</url>

Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-05-25 11:44:05 UTC (rev 9258)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java	2010-05-25 12:15:13 UTC (rev 9259)
@@ -29,6 +29,7 @@
 import javax.resource.spi.work.Work;
 import javax.resource.spi.work.WorkManager;
 
+import org.hornetq.api.core.HornetQException;
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.client.ClientSession;
 import org.hornetq.jms.client.HornetQConnectionFactory;
@@ -105,10 +106,10 @@
    // Whether we are in the failure recovery loop
    private AtomicBoolean inFailure = new AtomicBoolean(false);
 
-   private final int setupAttempts = 5;
+   private final int setupAttempts = 10;
+
+   private final long setupInterval = 2 * 1000;
    
-   private final long setupInterval = 10 * 1000;
-   
    static
    {
       try
@@ -505,9 +506,15 @@
     */
    public void handleFailure(Throwable failure)
    {
-      log.warn("Failure in HornetQ activation " + spec, failure);
+      if(failure instanceof HornetQException && ((HornetQException)failure).getCode() == HornetQException.QUEUE_DOES_NOT_EXIST)
+      {
+         log.info("awaiting topic/queue creation " + getActivationSpec().getDestination());
+      }
+      else
+      {
+         log.warn("Failure in HornetQ activation " + spec, failure);
+      }
       int reconnectCount = 0;
-      
       // Only enter the failure loop once
       if (inFailure.getAndSet(true))
          return;
@@ -536,7 +543,14 @@
             }
             catch (Throwable t)
             {
-               log.error("Unable to reconnect " + spec, t);
+               if(failure instanceof HornetQException && ((HornetQException)failure).getCode() == HornetQException.QUEUE_DOES_NOT_EXIST)
+               {
+                  log.info("awaiting topic/queue creation " + getActivationSpec().getDestination());
+               }
+               else
+               {
+                  log.error("Unable to reconnect " + spec, t);
+               }
             }
             ++reconnectCount;
          }



More information about the hornetq-commits mailing list