You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2011/07/27 09:27:52 UTC
svn commit: r1151364 -
/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
Author: xuhaihong
Date: Wed Jul 27 07:27:51 2011
New Revision: 1151364
URL: http://svn.apache.org/viewvc?rev=1151364&view=rev
Log:
GERONIMO-6097 Use temp directory directly with reference:// to avoid zip the deployed application in the deployment process
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=1151364&r1=1151363&r2=1151364&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 Wed Jul 27 07:27:51 2011
@@ -68,8 +68,6 @@ 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;
@@ -105,7 +103,6 @@ public class DeploymentContext {
private final BundleContext bundleContext;
protected Configuration configuration;
private Bundle tempBundle;
- private File tempBundleFile;
public DeploymentContext(File baseDir,
@@ -199,11 +196,9 @@ public class DeploymentContext {
LinkedHashSet<Artifact> resolvedParentIds = null;
try {
ConfigurationData configurationData = new ConfigurationData(moduleType, null, childConfigurationDatas, environment, baseDir, inPlaceConfigurationDir, naming);
- tempBundleFile = FileUtils.createTempFile();
createTempManifest();
createPluginMetadata();
- JarUtils.jarDirectory(this.getConfigurationDir(), tempBundleFile);
- String location = "reference:" + tempBundleFile.toURI().toURL();
+ String location = "reference:" + getConfigurationDir().toURI().toURL();
tempBundle = bundleContext.installBundle(location);
if (BundleUtils.canStart(tempBundle)) {
tempBundle.start(Bundle.START_TRANSIENT);
@@ -525,12 +520,6 @@ public class DeploymentContext {
} catch (BundleException e) {
}
}
- if (tempBundleFile != null) {
- try {
- tempBundleFile.delete();
- } catch (Exception e) {
- }
- }
}
public void addChildConfiguration(String moduleName, ConfigurationData configurationData) {