geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r733841 - /geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Date Mon, 12 Jan 2009 17:02:49 GMT
Author: dwoods
Date: Mon Jan 12 09:02:27 2009
New Revision: 733841

URL: http://svn.apache.org/viewvc?rev=733841&view=rev
Log:
GERONIMO-4420 Create Files under repository even if fail to deploy a jar having problems.
 Applied patch from Ivan.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=733841&r1=733840&r2=733841&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Mon Jan 12 09:02:27 2009
@@ -28,6 +28,7 @@
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
@@ -317,13 +318,7 @@
             ConfigurationStore store,
             DeploymentContext context) throws DeploymentException, IOException, Throwable
{
         List<ConfigurationData> configurations = new ArrayList<ConfigurationData>();
-        configurations.add(context.getConfigurationData());
-        configurations.addAll(context.getAdditionalDeployment());
-
-        if (configurations.isEmpty()) {
-            throw new DeploymentException("Deployer did not create any configurations");
-        }
-
+        
         boolean configsCleanupRequired = false;
 
         // Set TCCL to the classloader for the configuration being deployed
@@ -335,6 +330,25 @@
         ClassLoader oldCl = thread.getContextClassLoader();
         thread.setContextClassLoader( context.getConfiguration().getConfigurationClassLoader());
         try {
+            try {
+                configurations.add(context.getConfigurationData());
+            } catch (DeploymentException e) {
+                Configuration configuration = context.getConfiguration(); 
+                if (configuration != null) {
+                    ConfigurationData dumbConfigurationData = new ConfigurationData(null,
null, null, null,
+                            configuration.getEnvironment(), context.getBaseDir(), null, context.getNaming());
+                    configurations.add(dumbConfigurationData);
+                }
+                configurations.addAll(context.getAdditionalDeployment());
+                throw e;
+            }
+            
+            configurations.addAll(context.getAdditionalDeployment());
+
+            if (configurations.isEmpty()) {
+                throw new DeploymentException("Deployer did not create any configurations");
+            }
+
             if (targetFile != null) {
                 if (configurations.size() > 1) {
                     throw new DeploymentException("Deployer created more than one configuration");



Mime
View raw message