Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 51602 invoked from network); 20 Aug 2007 20:50:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2007 20:50:18 -0000 Received: (qmail 49018 invoked by uid 500); 20 Aug 2007 20:50:15 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 48960 invoked by uid 500); 20 Aug 2007 20:50:15 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 48949 invoked by uid 99); 20 Aug 2007 20:50:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2007 13:50:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2007 20:50:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3B3121A981A; Mon, 20 Aug 2007 13:49:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r567827 - /geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java Date: Mon, 20 Aug 2007 20:49:56 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070820204957.3B3121A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdillon Date: Mon Aug 20 13:49:55 2007 New Revision: 567827 URL: http://svn.apache.org/viewvc?rev=567827&view=rev Log: Slightly better debug/trace exception reporting Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java?rev=567827&r1=567826&r2=567827&view=diff ============================================================================== --- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java (original) +++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ServerProxy.java Mon Aug 20 13:49:55 2007 @@ -108,7 +108,7 @@ return mbeanConnection; } - public boolean isFullyStarted() { + public boolean isFullyStarted() { boolean fullyStarted = true; try { @@ -125,12 +125,26 @@ } } catch (IOException e) { - log.debug("Connection failure; ignoring", e); + String msg = "Connection failure; ignoring"; + if (log.isTraceEnabled()) { + log.trace(msg, e); + } + else if (log.isDebugEnabled()) { + log.debug(msg + ": " + e); + } + fullyStarted = false; lastError = e; } catch (Exception e) { - log.debug("Unable to determine if the server is fully started", e); + String msg = "Unable to determine if the server is fully started; ignoring"; + if (log.isTraceEnabled()) { + log.trace(msg, e); + } + else if (log.isDebugEnabled()) { + log.debug(msg + ": " + e); + } + fullyStarted = false; lastError = e; } @@ -145,19 +159,34 @@ ObjectName systemInfoQuery = new ObjectName("*:name=ServerInfo,j2eeType=GBean,*"); getConnection(); - - Set set = this.mbeanConnection.queryNames(systemInfoQuery, null); + + Set set = mbeanConnection.queryNames(systemInfoQuery, null); if (set.size() > 0) { ObjectName found = (ObjectName)set.iterator().next(); - home = (String)this.mbeanConnection.getAttribute(found, "currentBaseDirectory"); - } - - } catch (IOException e) { - log.debug("Connection failure; ignoring", e); + home = (String)mbeanConnection.getAttribute(found, "currentBaseDirectory"); + } + } + catch (IOException e) { + String msg = "Connection failure; ignoring"; + if (log.isTraceEnabled()) { + log.trace(msg, e); + } + else if (log.isDebugEnabled()) { + log.debug(msg + ": " + e); + } + lastError = e; - } catch (Exception e) { - log.debug("Unable to determine if the server home directory", e); + } + catch (Exception e) { + String msg = "Unable to determine if the server is fully started; ignoring"; + if (log.isTraceEnabled()) { + log.trace(msg, e); + } + else if (log.isDebugEnabled()) { + log.debug(msg + ": " + e); + } + lastError = e; }