[hornetq-commits] JBoss hornetq SVN: r10970 - in branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq: core/server/cluster/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jul 12 18:11:29 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-07-12 18:11:28 -0400 (Tue, 12 Jul 2011)
New Revision: 10970

Modified:
   branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
   branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
   branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
   branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/integration/logging/HornetQLoggerFormatter.java
Log:
fixing tests

Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-07-12 13:31:03 UTC (rev 10969)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-07-12 22:11:28 UTC (rev 10970)
@@ -1367,7 +1367,9 @@
             
             for (Connector conn : connectors)
             {
-               futuresList.add(threadPool.submit(conn));
+                // TODO:   Why using submit here? if we are waiting for it anyway?
+                log.info("XXX Submitting call towards " + conn);
+                futuresList.add(threadPool.submit(conn));
             }
             
             for (int i = 0, futuresSize = futuresList.size(); i < futuresSize; i++)
@@ -1473,6 +1475,10 @@
 
          public ClientSessionFactory call() throws HornetQException
          {
+            if (log.isDebugEnabled())
+            {
+               log.debug("Executing connection to " + factory + " through threadPool.submission()");
+            }
             try
             {
                factory.connect(initialConnectAttempts, failoverOnInitialConnection);

Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2011-07-12 13:31:03 UTC (rev 10969)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java	2011-07-12 22:11:28 UTC (rev 10970)
@@ -866,6 +866,7 @@
 
          backupServerLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(tcConfigs);
          backupServerLocator.setReconnectAttempts(-1);
+         backupServerLocator.setInitialConnectAttempts(-1);
       }
       else if (config.getDiscoveryGroupName() != null)
       {
@@ -880,6 +881,7 @@
 
          backupServerLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithoutHA(dg);
          backupServerLocator.setReconnectAttempts(-1);
+         backupServerLocator.setInitialConnectAttempts(-1);
       }
       else
       {
@@ -907,7 +909,7 @@
             }
             catch (Exception e)
             {
-               log.warn("Unable to announce backup", e);
+               log.warn("Unable to announce backup, retrying", e);
             }
          }
       });

Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2011-07-12 13:31:03 UTC (rev 10969)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2011-07-12 22:11:28 UTC (rev 10970)
@@ -754,7 +754,7 @@
 
          for (Runnable task : tasks)
          {
-            HornetQServerImpl.log.debug("Waiting for " + task);
+            HornetQServerImpl.log.debug(this + "::Waiting for " + task);
          }
 
          if (memoryManager != null)

Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/integration/logging/HornetQLoggerFormatter.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/integration/logging/HornetQLoggerFormatter.java	2011-07-12 13:31:03 UTC (rev 10969)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/integration/logging/HornetQLoggerFormatter.java	2011-07-12 22:11:28 UTC (rev 10970)
@@ -29,6 +29,8 @@
    {
       return clazzName.substring(clazzName.lastIndexOf(".") + 1);
    }
+   
+   private static String [] MONTHS = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
 
    @Override
    public String format(final LogRecord record)
@@ -37,9 +39,10 @@
       calendar.setTimeInMillis(record.getMillis());
       
       StringBuffer sb = new StringBuffer();
-      
+        
       sb.append("* [").append(Thread.currentThread().getName()).append("] ");
-      sb.append(calendar.get(GregorianCalendar.HOUR_OF_DAY) + ":" +
+      sb.append(calendar.get(GregorianCalendar.DAY_OF_MONTH) + "-" + MONTHS[calendar.get(GregorianCalendar.MONTH)] + " " + 
+                calendar.get(GregorianCalendar.HOUR_OF_DAY) + ":" +
                 calendar.get(GregorianCalendar.MINUTE) +
                 ":" +
                 calendar.get(GregorianCalendar.SECOND) +



More information about the hornetq-commits mailing list