geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1305424 - in /geronimo/server/branches/3.0-beta/framework/modules: geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ geronimo-system/src/main/java/org/apache/geronimo/system/configuration/
Date Mon, 26 Mar 2012 16:15:33 GMT
Author: xiaming
Date: Mon Mar 26 16:15:33 2012
New Revision: 1305424

URL: http://svn.apache.org/viewvc?rev=1305424&view=rev
Log:
GERONIMO-6112 Stop deployment when deployment time, new patch provided by xiezhi

Modified:
    geronimo/server/branches/3.0-beta/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationStoreUtil.java

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=1305424&r1=1305423&r2=1305424&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Mon Mar 26 16:15:33 2012
@@ -253,6 +253,8 @@ public class Deployer implements GBeanLi
 
             // It's our responsibility to close this context, once we're done with it...
             context = builder.buildConfiguration(inPlace, configID, plan, module, stores,
artifactResolver, store);
+
+            isNotCar(context.getBaseDir());
             // Copy the external plan to the META-INF folder with the uniform name plan.xml
if there is nothing there already
             if (planFile != null && !context.getTargetFile(PLAN_LOCATION).exists())
{
                 context.addFile(PLAN_LOCATION, planFile);
@@ -294,6 +296,20 @@ public class Deployer implements GBeanLi
         }
     }
 
+    private void isNotCar(File module) throws DeploymentException {
+        File meta = new File(module, "META-INF");
+        if (meta.exists()) {
+            File checkSum = new File(meta, "config.ser");
+            if (checkSum.exists()) {
+                throw new DeploymentException("Have found the config.ser in the deploy package."
+
+                        " It should be a car. Please use the install-plugin command to install
it.");
+            }
+        }
+        else {
+            return;
+        }
+    }
+
     private ConfigurationStore getConfigurationStore(String targetConfigurationStore)
             throws URISyntaxException, GBeanNotFoundException {
         if (targetConfigurationStore != null) {

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationStoreUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationStoreUtil.java?rev=1305424&r1=1305423&r2=1305424&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationStoreUtil.java
(original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ConfigurationStoreUtil.java
Mon Mar 26 16:15:33 2012
@@ -43,8 +43,7 @@ public class ConfigurationStoreUtil {
         // check if the sum already exists
         File sumFile = new File(file.getParentFile(), file.getName() + ".sha1");
         if (sumFile.exists()) {
-            throw new IOException("It is a configuration archive now. Sum file already exists.
" +
-            		"Please use the install-plugin command to install it.");
+            throw new IOException("Sum file already exists");
         }
 
         // calculate the checksum



Mime
View raw message