geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r562808 - /geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Date Sun, 05 Aug 2007 03:08:40 GMT
Author: linsun
Date: Sat Aug  4 20:08:39 2007
New Revision: 562808

URL: http://svn.apache.org/viewvc?view=rev&rev=562808
Log:
Fix for GERONIMO-3378 - Enhance debugability of Deployer by logging errors and more data on
debug.  Thanks Ted!

Modified:
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java?view=diff&rev=562808&r1=562807&r2=562808
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Sat Aug  4 20:08:39 2007
@@ -70,6 +70,8 @@
 
     private ConnectParams parseURI(String uri) {
         uri = uri.trim();
+        if (log.isDebugEnabled())
+            log.debug("Parsing URI=" + uri);
         if(!uri.startsWith(URI_PREFIX)) {
             return null;
         }
@@ -125,6 +127,8 @@
         if (params == null) {
             return null;
         }
+        if (log.isDebugEnabled())
+            log.debug("Using protocol=" + params.getProtocol() + ", host=" + params.getHost()
+ ", port=" + params.getPort());
 
         try {
             if (params.getProtocol().equals("jmx")) {
@@ -155,6 +159,8 @@
         environment.put(JMXConnector.CREDENTIALS, credentials);
         environment.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER, BaseDeploymentFactory.class.getClassLoader());
         try {
+            if (log.isDebugEnabled())
+                log.debug("Using JMXServiceURL with host=" + params.getHost() + ", port="
+ params.getPort());
             JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+params.getHost()+":"+params.getPort()+"/JMXConnector");
             JMXConnector jmxConnector = JMXConnectorFactory.connect(address, environment);
             RemoteDeploymentManager manager = getRemoteDeploymentManager();
@@ -164,9 +170,17 @@
             }
             return manager;
         } catch (IOException e) {
-            throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
+            log.fatal("caught " + e);
+            DeploymentManagerCreationException deploymentManagerCreationException = (DeploymentManagerCreationException)
new DeploymentManagerCreationException(
+                    e.getMessage()).initCause(e);
+            log.fatal("throwing " + deploymentManagerCreationException);
+            throw deploymentManagerCreationException;
         } catch (SecurityException e) {
-            throw (AuthenticationFailedException) new AuthenticationFailedException("Invalid
login.").initCause(e);
+            log.fatal("caught " + e);
+            AuthenticationFailedException authenticationFailedException = (AuthenticationFailedException)
new AuthenticationFailedException(
+                    "Invalid login.").initCause(e);
+            log.fatal("throwing " + authenticationFailedException);
+            throw authenticationFailedException;
         }
     }
 



Mime
View raw message