From commits-return-11872-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Fri Sep 25 17:37:22 2009 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 64817 invoked from network); 25 Sep 2009 17:37:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Sep 2009 17:37:21 -0000 Received: (qmail 5396 invoked by uid 500); 25 Sep 2009 17:37:21 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 5367 invoked by uid 500); 25 Sep 2009 17:37:21 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 5348 invoked by uid 99); 25 Sep 2009 17:37:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 17:37:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 17:37:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5A33823888DC; Fri, 25 Sep 2009 17:36:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090925173652.5A33823888DC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) {