geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1149226 - /geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
Date Thu, 21 Jul 2011 15:35:18 GMT
Author: xuhaihong
Date: Thu Jul 21 15:35:18 2011
New Revision: 1149226

URL: http://svn.apache.org/viewvc?rev=1149226&view=rev
Log:
Revert the unwanted commits for using reference:file/directory

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=1149226&r1=1149225&r2=1149226&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
Thu Jul 21 15:35:18 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,
@@ -197,11 +199,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 +525,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)
{



Mime
View raw message