activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r818925 - in /activemq/branches/activemq-5.3: ./ activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
Date Fri, 25 Sep 2009 17:36:52 GMT
Author: chirino
Date: Fri Sep 25 17:36:51 2009
New Revision: 818925

URL: http://svn.apache.org/viewvc?rev=818925&view=rev
Log:
Was part of AMQ-2414: reduce verbosity of expection traces in the console.


Modified:
    activemq/branches/activemq-5.3/   (props changed)
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java

Propchange: activemq/branches/activemq-5.3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 25 17:36:51 2009
@@ -1 +1 @@
-/activemq/trunk:816278-816279,816298,818138,818140-818147,818155,818160-818176,818209,818211,818224-818262,818480,818484,818487,818496,818502,818504-818510,818513-818516,818609,818635,818724-818762,818888,818905,818914
+/activemq/trunk:816278-816279,816298,818138,818140-818147,818155,818160-818176,818209,818211,818224-818262,818480,818484,818487,818496,818502,818504-818510,818513-818516,818609,818635,818724-818762,818888,818905,818914,818923

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java?rev=818925&r1=818924&r2=818925&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java
Fri Sep 25 17:36:51 2009
@@ -61,12 +61,14 @@
         stopping = false;
 
         LOG.info("Attempting to acquire the exclusive lock to become the Master broker");
+        String sql = statements.getLockCreateStatement();
+        LOG.debug("Locking Query is "+sql);
+        
         PreparedStatement statement = null;
         while (true) {
             try {
                 connection = dataSource.getConnection();
                 connection.setAutoCommit(false);
-                String sql = statements.getLockCreateStatement();
                 statement = connection.prepareStatement(sql);
                 statement.execute();
                 break;
@@ -91,7 +93,7 @@
                         }
 
                     } else {
-                        LOG.error("Failed to acquire lock: " + e, e);
+                        LOG.debug("Lock failure: "+ e, e);
                     }
                 } finally {
                     // Let's make sure the database connection is properly
@@ -112,13 +114,13 @@
                     try {
                         statement.close();
                     } catch (SQLException e1) {
-                        LOG.warn("Caught while closing statement: " + e1, e1);
+                        LOG.debug("Caught while closing statement: " + e1, e1);
                     }
                     statement = null;
                 }
             }
 
-            LOG.debug("Sleeping for " + lockAcquireSleepInterval + " milli(s) before trying
again to get the lock...");
+            LOG.info("Failed to acquire lock.  Sleeping for " + lockAcquireSleepInterval
+ " milli(s) before trying again...");
             try {
                 Thread.sleep(lockAcquireSleepInterval);
             } catch (InterruptedException ie) {



Mime
View raw message