geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r563139 - /geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Date Mon, 06 Aug 2007 13:57:44 GMT
Author: linsun
Date: Mon Aug  6 06:57:43 2007
New Revision: 563139

URL: http://svn.apache.org/viewvc?view=rev&rev=563139
Log:
Merge Geronimo-3378 into branch 2.0 (rev 562808, 562815, 562816)

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

Modified: geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java?view=diff&rev=563139&r1=563138&r2=563139
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Mon Aug  6 06:57:43 2007
@@ -70,6 +70,9 @@
 
     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 +128,9 @@
         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 +161,9 @@
         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 +173,17 @@
             }
             return manager;
         } catch (IOException e) {
-            throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
+            log.fatal("caught " + e.getMessage(), e);
+            DeploymentManagerCreationException deploymentManagerCreationException = 
+                    (DeploymentManagerCreationException) new DeploymentManagerCreationException(e.getMessage()).initCause(e);
+            log.fatal("throwing " + deploymentManagerCreationException.getMessage(), deploymentManagerCreationException);
+            throw deploymentManagerCreationException;
         } catch (SecurityException e) {
-            throw (AuthenticationFailedException) new AuthenticationFailedException("Invalid
login.").initCause(e);
+            log.fatal("caught " + e.getMessage(), e);
+            AuthenticationFailedException authenticationFailedException = 
+                    (AuthenticationFailedException) new AuthenticationFailedException("Invalid
login.").initCause(e);
+            log.fatal("throwing " + authenticationFailedException.getMessage(), authenticationFailedException);
+            throw authenticationFailedException;
         }
     }
 



Mime
View raw message