geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1078654 - /geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Date Mon, 07 Mar 2011 02:29:17 GMT
Author: genspring
Date: Mon Mar  7 02:29:17 2011
New Revision: 1078654

URL: http://svn.apache.org/viewvc?rev=1078654&view=rev
Log:
GERONIMO-5849 Application client can't be undeployed clearly.  -- use a temp dir to hold the
temp datas when deploying the appclient module.

Modified:
    geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java

Modified: geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=1078654&r1=1078653&r2=1078654&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Mon Mar  7 02:29:17 2011
@@ -536,18 +536,22 @@ public class AppClientModuleBuilder impl
 //            clientEnvironment.setConfigId(configId);
 //        }
 
-        File appClientDir;
+
         try {
-            appClientDir = targetConfigurationStore.createNewConfigurationDir(clientEnvironment.getConfigId());
+            targetConfigurationStore.createNewConfigurationDir(clientEnvironment.getConfigId());
         } catch (ConfigurationAlreadyExistsException e) {
             throw new DeploymentException("Unable to create configuration directory for "
+ clientEnvironment.getConfigId(), e);
         }
 
         // construct the app client deployment context... this is the same class used by
the ear context
         EARContext appClientDeploymentContext;
+        
+        
         try {
+          //Use a temporary folder to hold the extracted files for analysis use
+            File tempDirectory = FileUtils.createTempDir();
 
-            appClientDeploymentContext = new EARContext(appClientDir,
+            appClientDeploymentContext = new EARContext(tempDirectory,
                     null,
                     clientEnvironment,
                     ConfigurationModuleType.CAR,
@@ -577,8 +581,9 @@ public class AppClientModuleBuilder impl
                 module.getClassPath().addAll(libClasspath);
             }
         } catch (DeploymentException e) {
-            cleanupAppClientDir(appClientDir);
             throw e;
+        } catch (IOException e) {
+           throw new DeploymentException(e);
         }
         for (Module connectorModule : appClientModule.getModules()) {
             if (connectorModule instanceof ConnectorModule) {



Mime
View raw message