djencks 2004/02/08 12:19:21
Modified: modules/jetty/src/java/org/apache/geronimo/jetty/deployment
JettyModule.java WARConfigurationFactory.java
Log:
remove dead code
Revision Changes Path
1.10 +1 -50
incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java
Index: JettyModule.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- JettyModule.java 8 Feb 2004 02:06:13 -0000 1.9
+++ JettyModule.java 8 Feb 2004 20:19:21 -0000 1.10
@@ -55,10 +55,8 @@
*/
package org.apache.geronimo.jetty.deployment;
-import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -67,9 +65,7 @@
import org.apache.geronimo.deployment.ConfigurationCallback;
import org.apache.geronimo.deployment.DeploymentException;
-import org.apache.geronimo.deployment.util.XMLUtil;
import org.apache.geronimo.xbeans.geronimo.deployment.jetty.JettyWebAppType;
-import org.w3c.dom.Document;
/**
*
@@ -82,51 +78,6 @@
private final boolean closeStream;
private URI classes;
private URI lib;
-
- public JettyModule(URI configID, InputStream moduleArchive, Document
deploymentPlan) throws DeploymentException
- {
- super(configID);
- moduleDirectory= null;
- this.zipArchive= new ZipInputStream(moduleArchive);
- closeStream= false;
-
- // TODO - This should decode XML directly here. Should use xmlbeans?
- contextPath=
XMLUtil.getChildContent(deploymentPlan.getDocumentElement(), "context-root",
null, null);
- if (contextPath == null)
- throw new DeploymentException("No context root specified");
- String
t=XMLUtil.getChildContent(deploymentPlan.getDocumentElement(),
"context-priority-classloader", null, null);
- contextPriorityClassLoader= new Boolean(t).booleanValue();
- }
-
- public JettyModule(URI configID, File archiveFile, Document
deploymentPlan) throws DeploymentException {
- super(configID);
- if (!archiveFile.isDirectory()) {
- moduleDirectory = null;
- try {
- this.zipArchive = new ZipInputStream(new
BufferedInputStream(new FileInputStream(archiveFile)));
- closeStream = false;
- } catch (FileNotFoundException e) {
- throw new DeploymentException("Could not open module
archive", e);
- }
- } else {
- moduleDirectory = archiveFile;
- this.zipArchive = null;
- closeStream = false;
- }
-
- contextPath = archiveFile.getName();
- if (contextPath.endsWith(".war")) {
- contextPath = contextPath.substring(0, contextPath.length() - 4);
- }
- contextPath =
XMLUtil.getChildContent(deploymentPlan.getDocumentElement(), "context-root",
contextPath, contextPath);
- if (!contextPath.startsWith("/")) {
- contextPath = "/" + contextPath;
- }
-
- // TODO - This should decode XML directly here. Should use x
mlbeans?
- String
t=XMLUtil.getChildContent(deploymentPlan.getDocumentElement(),
"context-priority-classloader", null, null);
- contextPriorityClassLoader= new Boolean(t).booleanValue();
- }
public JettyModule(URI configID, InputStream moduleArchive,
JettyWebAppType webApp) throws DeploymentException {
super(configID);
1.6 +3 -17
incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WARConfigurationFactory.java
Index: WARConfigurationFactory.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WARConfigurationFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- WARConfigurationFactory.java 6 Feb 2004 08:55:49 -0000 1.5
+++ WARConfigurationFactory.java 8 Feb 2004 20:19:21 -0000 1.6
@@ -55,7 +55,6 @@
*/
package org.apache.geronimo.jetty.deployment;
-import java.io.File;
import java.io.InputStream;
import java.net.URI;
@@ -74,8 +73,6 @@
import org.apache.xmlbeans.SchemaTypeLoader;
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlObject;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
/**
*
@@ -92,6 +89,8 @@
return new WARConfiguration(deployable);
}
+ //TODO a createModule method taking a file/directory for unpacked jsp
handling.
+ //Should create a UnpackedModule if supplied file is a directory.
public DeploymentModule createModule(InputStream moduleArchive,
XmlObject deploymentPlan, URI configID, boolean isLocal) throws
DeploymentException {
JettyWebAppDocument webAppDoc = (JettyWebAppDocument)deploymentPlan;
return new JettyModule(configID, moduleArchive,
webAppDoc.getWebApp());
@@ -104,19 +103,6 @@
public SchemaTypeLoader getSchemaTypeLoader() {
return SCHEMA_TYPE_LOADER;
- }
-
- public DeploymentModule createModule(File moduleArchive, Document
deploymentPlan, URI configID, boolean isLocal) throws DeploymentException {
- Element root = deploymentPlan.getDocumentElement();
- if (!"web-app".equals(root.getNodeName())) {
- return null;
- }
-
- if (isLocal && moduleArchive.isDirectory()) {
- return new UnpackedModule(configID, moduleArchive,
deploymentPlan);
- } else {
- return new JettyModule(configID, moduleArchive, deploymentPlan);
- }
}
public static final GBeanInfo GBEAN_INFO;