geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
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 GMT
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;
         }
         



Mime
View raw message