Return-Path: Delivered-To: apmail-incubator-geronimo-cvs-archive@www.apache.org Received: (qmail 53521 invoked from network); 8 Feb 2004 20:19:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Feb 2004 20:19:25 -0000 Received: (qmail 59206 invoked by uid 500); 8 Feb 2004 20:19:12 -0000 Delivered-To: apmail-incubator-geronimo-cvs-archive@incubator.apache.org Received: (qmail 59084 invoked by uid 500); 8 Feb 2004 20:19:12 -0000 Mailing-List: contact geronimo-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-cvs@incubator.apache.org Received: (qmail 59070 invoked from network); 8 Feb 2004 20:19:12 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 8 Feb 2004 20:19:12 -0000 Received: (qmail 53506 invoked by uid 1712); 8 Feb 2004 20:19:21 -0000 Date: 8 Feb 2004 20:19:21 -0000 Message-ID: <20040208201921.53505.qmail@minotaur.apache.org> From: djencks@apache.org To: incubator-geronimo-cvs@apache.org Subject: cvs commit: incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment JettyModule.java WARConfigurationFactory.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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;