geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r894559 - /geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java
Date Wed, 30 Dec 2009 07:53:31 GMT
Author: genspring
Date: Wed Dec 30 07:53:31 2009
New Revision: 894559

URL: http://svn.apache.org/viewvc?rev=894559&view=rev
Log:
GERONIMO-4948 To migrate existing geronimo gshell commands to karaf based shell. --- Fix a
classloader problem.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java

Modified: geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java?rev=894559&r1=894558&r2=894559&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ServerConnection.java
Wed Dec 30 07:53:31 2009
@@ -36,8 +36,8 @@
 import org.apache.geronimo.deployment.plugin.factories.AuthenticationFailedException;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
 import org.apache.geronimo.deployment.plugin.jmx.LocalDeploymentManager;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.Kernel;
 
 /**
  * Supports online connections to the server, via JSR-88, valid only
@@ -91,7 +91,14 @@
                 throw new DeploymentException(e);
             }
         } else {
+
+            ClassLoader OldCL = Thread.currentThread().getContextClassLoader();
+            Thread.currentThread().setContextClassLoader(DeployUtils.class.getClassLoader());
+           
             tryToConnect(uri, driver, user, password, secure);
+            
+            Thread.currentThread().setContextClassLoader(OldCL);
+
         }
         if (manager == null) {
             throw new DeploymentException("Unexpected error; connection failed.");



Mime
View raw message