You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@apache.org on 2011/07/22 05:11:50 UTC

svn commit: r1149442 - /geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java

Author: genspring
Date: Fri Jul 22 03:11:49 2011
New Revision: 1149442

URL: http://svn.apache.org/viewvc?rev=1149442&view=rev
Log:
Revert "GERONIMO-6092 Unwanted application client entry is added in config.xml file"

This reverts commit 6ea8eca57be94273c3d0667cea4419afb8a93a07.

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

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=1149442&r1=1149441&r2=1149442&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Fri Jul 22 03:11:49 2011
@@ -68,6 +68,8 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.Dependency;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.system.plugin.model.ArtifactType;
 import org.apache.geronimo.system.plugin.model.DependencyType;
 import org.apache.geronimo.system.plugin.model.PluginArtifactType;
@@ -103,7 +105,7 @@ public class DeploymentContext {
     private final BundleContext bundleContext;
     protected Configuration configuration;
     private Bundle tempBundle;
-    //private File tempBundleFile;
+    private File tempBundleFile;
 
 
     public DeploymentContext(File baseDir,
@@ -144,7 +146,7 @@ public class DeploymentContext {
         this.naming = naming;
         this.moduleType = moduleType;
         this.environment = environment;
-        this.configurationManager = createConfigurationManager(configurationManager, Collections.<Repository> emptyList(), bundleContext);
+        this.configurationManager = configurationManager;
         this.bundleContext = bundleContext;
 
         if (null == inPlaceConfigurationDir) {
@@ -173,15 +175,12 @@ public class DeploymentContext {
         this.naming = naming;
         this.moduleType = moduleType;
         this.environment = environment;
-        this.configurationManager = createConfigurationManager(configurationManager, Collections.<Repository> emptyList(), bundleContext);
+        this.configurationManager = configurationManager;
         this.resourceContext = resourceContext;
         this.bundleContext = bundleContext;
     }
 
     private static ConfigurationManager createConfigurationManager(ConfigurationManager configurationManager, Collection<Repository> repositories, BundleContext bundleContext) {
-        if(configurationManager instanceof DeploymentConfigurationManager) {
-            return configurationManager;
-        }
         return new DeploymentConfigurationManager(configurationManager, repositories, bundleContext);
     }
 
@@ -197,11 +196,11 @@ public class DeploymentContext {
         LinkedHashSet<Artifact> resolvedParentIds = null;
         try {
             ConfigurationData configurationData = new ConfigurationData(moduleType, null, childConfigurationDatas, environment, baseDir, inPlaceConfigurationDir, naming);
-            //tempBundleFile = FileUtils.createTempFile();
+            tempBundleFile = FileUtils.createTempFile();
             createTempManifest();
             createPluginMetadata();
-            //JarUtils.jarDirectory(this.getConfigurationDir(), tempBundleFile);
-            String location = "reference:" + this.getConfigurationDir().toURI().toURL();
+            JarUtils.jarDirectory(this.getConfigurationDir(), tempBundleFile);
+            String location = "reference:" + tempBundleFile.toURI().toURL();
             tempBundle = bundleContext.installBundle(location);
             if (BundleUtils.canStart(tempBundle)) {
                 tempBundle.start(Bundle.START_TRANSIENT);
@@ -523,12 +522,12 @@ public class DeploymentContext {
             } catch (BundleException e) {
             }
         }
-        /*if (tempBundleFile != null) {
+        if (tempBundleFile != null) {
             try {
                 tempBundleFile.delete();
             } catch (Exception e) {
             }
-        }*/
+        }
     }
 
     public void addChildConfiguration(String moduleName, ConfigurationData configurationData) {