geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r447933 [3/4] - in /geronimo/sandbox/javaee5: ./ assemblies-jee5/ assemblies-jee5/geronimo-jetty6-jee5/ assemblies-jee5/geronimo-jetty6-jee5/src/ assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/ configs-jee5/ configs-jee5/jetty6-de...
Date Tue, 19 Sep 2006 19:17:15 GMT
Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java?view=auto&rev=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java Tue Sep 19 12:17:10 2006
@@ -0,0 +1,346 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.jetty6.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.geronimo.testsupport.TestSupport;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.service.GBeanBuilder;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.UnavailableWebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
+import org.apache.geronimo.jetty6.JettyContainerImpl;
+import org.apache.geronimo.jetty6.connector.HTTPConnector;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.EditableKernelConfigurationManager;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.config.NullConfigurationStore;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.ArtifactManager;
+import org.apache.geronimo.kernel.repository.ArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
+import org.apache.geronimo.system.serverinfo.BasicServerInfo;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManagerGBean;
+import org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument;
+import org.apache.xmlbeans.impl.schema.SchemaTypeImpl;
+
+/**
+ * @version $Rev:385232 $ $Date$
+ */
+public class JettyModuleBuilderTest extends TestSupport {
+
+    private static Naming naming = new Jsr77Naming();
+    private Artifact baseId = new Artifact("test", "base", "1", "car");
+    private final AbstractName serverName = naming.createRootName(baseId, "Server", "J2EEServer");
+
+    protected Kernel kernel;
+    private AbstractName tmName;
+    private AbstractName ctcName;
+    private ClassLoader cl;
+    private JettyModuleBuilder builder;
+    private Artifact webModuleArtifact = new Artifact("foo", "bar", "1", "car");
+    private Environment defaultEnvironment = new Environment();
+    private ConfigurationManager configurationManager;
+    private ConfigurationStore configStore;
+
+    public void testDeployWar4() throws Exception {
+        File outputPath = new File(BASEDIR, "target/test-resources/deployables/war4");
+        recursiveDelete(outputPath);
+        outputPath.mkdirs();
+        new File(outputPath, "war").mkdir();
+        File path = new File(BASEDIR, "src/test/resources/deployables/war4");
+        UnpackedJarFile jarFile = new UnpackedJarFile(path);
+        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
+        Repository repository = null;
+
+        AbstractName moduleName = module.getModuleName();
+        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
+        module.setEarContext(earContext);
+        module.setRootEarContext(earContext);
+        builder.initContext(earContext, module, cl);
+        builder.addGBeans(earContext, module, cl, Collections.EMPTY_SET);
+        ConfigurationData configurationData = earContext.getConfigurationData();
+        earContext.close();
+        module.close();
+
+        Artifact configurationId = configurationData.getId();
+        configurationManager.loadConfiguration(configurationData);
+        Configuration configuration = configurationManager.getConfiguration(configurationId);
+        configurationManager.startConfiguration(configurationId);
+
+        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(moduleName));
+        Set names = configuration.findGBeans(new AbstractNameQuery(moduleName.getArtifact(), Collections.EMPTY_MAP));
+        log.debug("names: " + names);
+        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
+            AbstractName objectName = (AbstractName) iterator.next();
+            assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(objectName));
+        }
+
+        configurationManager.stopConfiguration(configurationId);
+        configurationManager.unloadConfiguration(configurationId);
+
+    }
+
+    public void testContextRootWithSpaces() throws Exception {
+        File outputPath = new File(BASEDIR, "target/test-resources/deployables/war-spaces-in-context");
+        recursiveDelete(outputPath);
+        outputPath.mkdirs();
+        new File(outputPath, "war").mkdir();
+        File path = new File(BASEDIR, "src/test/resources/deployables/war-spaces-in-context");
+        UnpackedJarFile jarFile = new UnpackedJarFile(path);
+        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
+        Repository repository = null;
+
+        AbstractName moduleName = module.getModuleName();
+        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
+        module.setEarContext(earContext);
+        module.setRootEarContext(earContext);
+        builder.initContext(earContext, module, cl);
+        builder.addGBeans(earContext, module, cl, Collections.EMPTY_SET);
+        ConfigurationData configurationData = earContext.getConfigurationData();
+        earContext.close();
+        module.close();
+
+        Artifact configurationId = configurationData.getId();
+        configurationManager.loadConfiguration(configurationData);
+        Configuration configuration = configurationManager.getConfiguration(configurationId);
+        configurationManager.startConfiguration(configurationId);
+
+        String contextRoot = (String) kernel.getAttribute(moduleName, "contextPath");
+        assertNotNull(contextRoot);
+        assertEquals(contextRoot, contextRoot.trim());
+
+        configurationManager.stopConfiguration(configurationId);
+        configurationManager.unloadConfiguration(configurationId);
+
+    }
+
+    private EARContext createEARContext(File outputPath, Environment environment, Repository repository, ConfigurationStore configStore, AbstractName moduleName) throws DeploymentException {
+        Set repositories = repository == null ? Collections.EMPTY_SET : Collections.singleton(repository);
+        ArtifactManager artifactManager = new DefaultArtifactManager();
+        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repositories, null);
+        return new EARContext(outputPath,
+                null,
+                environment,
+                ConfigurationModuleType.WAR,
+                naming,
+                configurationManager,
+                repositories,
+                new AbstractNameQuery(serverName),
+                moduleName,
+                new AbstractNameQuery(tmName),
+                new AbstractNameQuery(ctcName),
+                null,
+                null,
+                null
+        );
+    }
+
+    private void recursiveDelete(File path) {
+        //does not delete top level dir passed in
+        File[] listing = path.listFiles();
+        if (listing != null) {
+            for (int i = 0; i < listing.length; i++) {
+                File file = listing[i];
+                if (file.isDirectory()) {
+                    recursiveDelete(file);
+                }
+                file.delete();
+            }
+        }
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        ((SchemaTypeImpl)GerSecurityDocument.type).addSubstitutionGroupMember(org.apache.geronimo.xbeans.geronimo.security.GerSecurityDocument.type.getDocumentElementName());
+
+        cl = this.getClass().getClassLoader();
+        kernel = KernelFactory.newInstance().createKernel("test");
+        kernel.boot();
+
+        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
+
+        bootstrap.addGBean("ServerInfo", BasicServerInfo.GBEAN_INFO).setAttribute("baseDirectory", ".");
+
+        AbstractName configStoreName = bootstrap.addGBean("MockConfigurationStore", MockConfigStore.GBEAN_INFO).getAbstractName();
+
+        GBeanData artifactManagerData = bootstrap.addGBean("ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
+
+        GBeanData artifactResolverData = bootstrap.addGBean("ArtifactResolver", DefaultArtifactResolver.GBEAN_INFO);
+        artifactResolverData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
+
+        GBeanData configurationManagerData = bootstrap.addGBean("ConfigurationManager", EditableKernelConfigurationManager.GBEAN_INFO);
+        configurationManagerData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
+        configurationManagerData.setReferencePattern("ArtifactResolver", artifactResolverData.getAbstractName());
+        configurationManagerData.setReferencePattern("Stores", configStoreName);
+        bootstrap.addGBean(configurationManagerData);
+
+        GBeanData serverData = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
+        bootstrap.addGBean(serverData);
+
+        Collection defaultServlets = new HashSet();
+        Collection defaultFilters = new HashSet();
+        Collection defaultFilterMappings = new HashSet();
+        Object pojoWebServiceTemplate = null;
+        WebServiceBuilder webServiceBuilder = new UnavailableWebServiceBuilder();
+
+        GBeanData containerData = bootstrap.addGBean("JettyContainer", JettyContainerImpl.GBEAN_INFO);
+        AbstractName containerName = containerData.getAbstractName();
+
+        GBeanData connector = bootstrap.addGBean("JettyConnector", HTTPConnector.GBEAN_INFO);
+        connector.setAttribute("port", new Integer(5678));
+        connector.setAttribute("maxThreads", new Integer(50));
+//        connector.setAttribute("minThreads", new Integer(10));
+        connector.setReferencePattern("JettyContainer", containerName);
+
+        GBeanData tm = bootstrap.addGBean("TransactionManager", GeronimoTransactionManagerGBean.GBEAN_INFO);
+        tmName = tm.getAbstractName();
+        tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));
+
+        GBeanData ctc = bootstrap.addGBean("ConnectionTrackingCoordinator", ConnectionTrackingCoordinatorGBean.GBEAN_INFO);
+        ctcName = ctc.getAbstractName();
+        ctc.setReferencePattern("TransactionManager", tmName);
+
+        ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, getClass().getClassLoader());
+
+        configurationManager = ConfigurationUtil.getEditableConfigurationManager(kernel);
+        configStore = (ConfigurationStore) kernel.getGBean(configStoreName);
+        configStore.install(bootstrap);
+
+        defaultEnvironment.addDependency(baseId, ImportType.ALL);
+        defaultEnvironment.setConfigId(webModuleArtifact);
+        builder = new JettyModuleBuilder(defaultEnvironment,
+                         new Integer(1800),
+                         Collections.EMPTY_LIST,
+                         new AbstractNameQuery(containerName),
+                         defaultServlets,
+                         defaultFilters,
+                         defaultFilterMappings,
+                         pojoWebServiceTemplate,
+                         Collections.singleton(webServiceBuilder),
+                         null,
+                         Collections.singleton(new GeronimoSecurityBuilderImpl()),
+                         Collections.singleton(new GBeanBuilder(null, null)),
+                         new NamingBuilderCollection(null, null), 
+                         kernel);
+    }
+
+    protected void tearDown() throws Exception {
+        kernel.shutdown();
+        super.tearDown();
+    }
+
+
+    public static class MockConfigStore extends NullConfigurationStore {
+        private Map configs = new HashMap();
+
+        URL baseURL;
+
+        public MockConfigStore() {
+        }
+
+        public MockConfigStore(URL baseURL) {
+            this.baseURL = baseURL;
+        }
+
+        public void install(ConfigurationData configurationData) throws IOException, InvalidConfigException {
+            configs.put(configurationData.getId(), configurationData);
+        }
+
+        public void uninstall(Artifact configID) throws NoSuchConfigException, IOException {
+            configs.remove(configID);
+        }
+
+        public ConfigurationData loadConfiguration(Artifact configId) throws NoSuchConfigException, IOException, InvalidConfigException {
+            if (configs.containsKey(configId)) {
+                ConfigurationData configurationData = (ConfigurationData) configs.get(configId);
+                configurationData.setConfigurationStore(this);
+                return configurationData;
+            } else {
+                ConfigurationData configurationData = new ConfigurationData(configId, naming);
+                configurationData.setConfigurationStore(this);
+                return configurationData;
+            }
+        }
+
+        public boolean containsConfiguration(Artifact configID) {
+            return true;
+        }
+
+        public File createNewConfigurationDir(Artifact configId) {
+            try {
+                return DeploymentUtil.createTempDir();
+            } catch (IOException e) {
+                return null;
+            }
+        }
+
+        public Set resolve(Artifact configId, String moduleName, String pattern) throws NoSuchConfigException, MalformedURLException {
+            return Collections.singleton(baseURL);
+        }
+
+        public final static GBeanInfo GBEAN_INFO;
+
+        static {
+            GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(MockConfigStore.class, NameFactory.CONFIGURATION_STORE);
+            infoBuilder.addInterface(ConfigurationStore.class);
+            GBEAN_INFO = infoBuilder.getBeanInfo();
+        }
+    }
+}

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java?view=auto&rev=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java Tue Sep 19 12:17:10 2006
@@ -0,0 +1,265 @@
+package org.apache.geronimo.jetty6.deployment;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.jar.JarFile;
+  
+import javax.xml.namespace.QName;
+
+import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.deployment.service.GBeanBuilder;
+import org.apache.geronimo.deployment.xbeans.ArtifactType;
+import org.apache.geronimo.deployment.xbeans.EnvironmentType;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
+import org.apache.geronimo.testsupport.TestSupport;
+import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
+import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.JettyWebAppDocument;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.JettyWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.config.GerJettyDocument;
+import org.apache.geronimo.xbeans.javaee.WebAppDocument;
+import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ */
+public class PlanParsingTest extends TestSupport {
+    
+    private ClassLoader classLoader = this.getClass().getClassLoader();
+
+    private Naming naming = new Jsr77Naming();
+    private Artifact baseId = new Artifact("test", "base", "1", "car");
+    private AbstractName baseRootName = naming.createRootName(baseId, "root", NameFactory.SERVICE_MODULE);
+    private AbstractNameQuery jettyContainerObjectName = new AbstractNameQuery(naming.createChildName(baseRootName, "jettyContainer", NameFactory.GERONIMO_SERVICE));
+    private AbstractName pojoWebServiceTemplate = null;
+    private WebServiceBuilder webServiceBuilder = null;
+    private Environment defaultEnvironment = new Environment();
+    private JettyModuleBuilder builder;
+
+    public PlanParsingTest() throws Exception {
+        builder = new JettyModuleBuilder(defaultEnvironment,
+            new Integer(1800),
+            null,
+            jettyContainerObjectName,
+            new HashSet(),
+            new HashSet(),
+            new HashSet(),
+            pojoWebServiceTemplate,
+            Collections.singleton(webServiceBuilder),
+            null,
+            Collections.singleton(new GeronimoSecurityBuilderImpl()),
+            Collections.singleton(new GBeanBuilder(null, null)),
+            new NamingBuilderCollection(null, null), 
+            null);
+    }
+
+    public void testContents() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity1() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1A.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity2() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1B.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity3() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1C.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+//        log.debug(jettyWebApp.xmlText());
+    }
+
+    public void testOldFormat() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan2.xml");
+        assertTrue(resourcePlan!= null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testOldFormatExploded() throws Exception {
+        URL war = classLoader.getResource("deployables/war5");
+        assertTrue(war != null);
+        UnpackedJarFile moduleFile = new UnpackedJarFile(new File(war.getFile()));
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        moduleFile.close();
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+    }
+
+    public void XtestOldFormatPackaged() throws Exception {
+        URL war = classLoader.getResource("deployables/war6.war");
+        assertTrue(war != null);
+        JarFile moduleFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        moduleFile.close();
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+    }
+
+    public void testConstructPlan() throws Exception {
+        JettyWebAppDocument jettyWebAppDoc = JettyWebAppDocument.Factory.newInstance();
+        JettyWebAppType webApp = jettyWebAppDoc.addNewWebApp();
+        addEnvironment(webApp);
+        GerResourceRefType ref = webApp.addNewResourceRef();
+        ref.setRefName("ref");
+        ref.setResourceLink("target");
+
+        XmlBeansUtil.validateDD(webApp);
+        log.debug(webApp.toString());
+    }
+
+    private void addEnvironment(JettyWebAppType webApp) {
+        EnvironmentType environmentType = webApp.addNewEnvironment();
+        ArtifactType configId = environmentType.addNewModuleId();
+        configId.setGroupId("g");
+        configId.setArtifactId("a");
+        configId.setVersion("1");
+        configId.setType("car");
+    }
+
+    /** This test has 2 purposes: one the obvious one explicitly tested,
+     * the other that passing a JettyWebAppType XmlObject in works.  This latter
+     * models a web-app element inside an ear plan.
+     *
+     * @throws Exception
+     */
+    public void testContextRootWithPlanAndContextSet() throws Exception {
+
+        JettyWebAppDocument jettyWebAppDoc = JettyWebAppDocument.Factory.newInstance();
+        JettyWebAppType webApp = jettyWebAppDoc.addNewWebApp();
+        addEnvironment(webApp);
+        webApp.setContextRoot("myContextRoot");
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+
+        webApp = builder.getJettyWebApp(webApp, dummyFile, true, null, null);
+
+        assertEquals("myContextRoot", webApp.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanStandAlone() throws Exception {
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, true, null, null);
+
+        assertEquals("war2", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanAndTargetPath() throws Exception {
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", null);
+
+        assertEquals("myTargetPath", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanButWebApp() throws Exception {
+
+        WebAppDocument webAppDocument = WebAppDocument.Factory.newInstance();
+        WebAppType webAppType = webAppDocument.addNewWebApp();
+        webAppType.setId("myId");
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", webAppType);
+
+        assertEquals("myId", GerWebAppType.getContextRoot());
+
+    }
+
+    public void testParseSpecDD() {
+
+    }
+
+    public void testConvertToJettySchema() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan4.xml");
+        assertTrue(resourcePlan != null);
+        XmlObject rawPlan = XmlBeansUtil.parse(resourcePlan, getClass().getClassLoader());
+        XmlObject webPlan = new GenericToSpecificPlanConverter(GerJettyDocument.type.getDocumentElementName().getNamespaceURI(),
+                JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "jetty").convertToSpecificPlan(rawPlan);
+        URL ConvertedPlan = classLoader.getResource("plans/plan4-converted.xml");
+        assertTrue(ConvertedPlan != null);
+        XmlObject converted = XmlBeansUtil.parse(ConvertedPlan, getClass().getClassLoader());
+        XmlCursor c = converted.newCursor();
+        SchemaConversionUtils.findNestedElement(c, JettyWebAppDocument.type.getDocumentElementName());
+        c.toFirstChild();
+        ArrayList problems = new ArrayList();
+        compareXmlObjects(webPlan, c, problems);
+        assertEquals("problems: " + problems, 0, problems.size());
+    }
+
+    private boolean compareXmlObjects(XmlObject xmlObject, XmlCursor expected, List problems) {
+        XmlCursor test = xmlObject.newCursor();
+        boolean similar = true;
+        int elementCount = 0;
+        while (toNextStartToken(test)) {
+            elementCount++;
+            if (!toNextStartToken(expected)) {
+                problems.add("test longer than expected at element: " + elementCount);
+                return false;
+            }
+            QName actualName = test.getName();
+            QName expectedName = expected.getName();
+            if (!actualName.equals(expectedName)) {
+                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualName + ", expected: " + expectedName);
+                similar = false;
+            }
+            test.toNextToken();
+            expected.toNextToken();
+        }
+        return similar;
+    }
+
+    private boolean toNextStartToken(XmlCursor cursor) {
+        while (!cursor.isStart()) {
+            if (!cursor.hasNextToken()) {
+                return false;
+            }
+            cursor.toNextToken();
+        }
+        return true;
+    }
+
+
+}

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java?view=auto&rev=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java Tue Sep 19 12:17:10 2006
@@ -0,0 +1,83 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.jetty6.deployment;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.xbeans.javaee.ServletType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StartupOrderComparatorTest extends TestCase {
+
+    private final JettyModuleBuilder.StartupOrderComparator c = new JettyModuleBuilder.StartupOrderComparator();
+
+    public void testNoOrders() throws Exception {
+        ServletType s1 = makeServletType("a", -1);
+        ServletType s2 = makeServletType("b", -1);
+        ServletType s3 = makeServletType("c", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testIdenticalOrders() throws Exception {
+        ServletType s1 = makeServletType("a", 1);
+        ServletType s2 = makeServletType("b", 1);
+        ServletType s3 = makeServletType("c", 1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testDistinctOrders() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("b", 2);
+        ServletType s3 = makeServletType("a", 3);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testMixedOrders1() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("b", 2);
+        ServletType s3 = makeServletType("a", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testMixedOrders2() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("a", -1);
+        ServletType s3 = makeServletType("b", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    private void checkOrdering(ServletType s1, ServletType s2, ServletType s3) {
+        //symmetric
+        assertTrue(c.compare(s1, s2) < 0);
+        assertTrue(c.compare(s2, s1) > 0);
+        //reflexive
+        assertTrue(c.compare(s1, s1) == 0);
+        //transitive
+        assertTrue(c.compare(s2, s3) < 0);
+        assertTrue(c.compare(s1, s3) < 0);
+    }
+
+    private ServletType makeServletType(String servletName, int order) {
+        ServletType s1 = ServletType.Factory.newInstance();
+        s1.addNewServletName().setStringValue(servletName);
+        if (order > -1) {
+            s1.setLoadOnStartup(Integer.valueOf(order));
+        }
+        return s1;
+    }
+}

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/deployables/war4/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/deployables/war4/WEB-INF/web.xml?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/deployables/war4/WEB-INF/web.xml (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/deployables/war4/WEB-INF/web.xml Tue Sep 19 12:17:10 2006
@@ -3,7 +3,7 @@
     <display-name>war4</display-name>
     <filter>
         <filter-name>Filter1</filter-name>
-        <filter-class>org.apache.geronimo.jetty.app.Filter1</filter-class>
+        <filter-class>org.apache.geronimo.jetty6.app.Filter1</filter-class>
         <init-param>
             <param-name>attribute1</param-name>
             <param-value>value1</param-value>
@@ -11,7 +11,7 @@
     </filter>
     <filter>
         <filter-name>Filter2</filter-name>
-        <filter-class>org.apache.geronimo.jetty.app.Filter2</filter-class>
+        <filter-class>org.apache.geronimo.jetty6.app.Filter2</filter-class>
         <init-param>
             <param-name>attribute1</param-name>
             <param-value>value2</param-value>
@@ -27,11 +27,11 @@
     </filter-mapping>
     <servlet>
         <servlet-name>Servlet1</servlet-name>
-        <servlet-class>org.apache.geronimo.jetty.app.Servlet1</servlet-class>
+        <servlet-class>org.apache.geronimo.jetty6.app.Servlet1</servlet-class>
     </servlet>
     <servlet>
         <servlet-name>Servlet2</servlet-name>
-        <servlet-class>org.apache.geronimo.jetty.app.Servlet2</servlet-class>
+        <servlet-class>org.apache.geronimo.jetty6.app.Servlet2</servlet-class>
     </servlet>
     <servlet-mapping>
         <servlet-name>Servlet1</servlet-name>

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/services/local.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/services/local.xml?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/services/local.xml (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/resources/services/local.xml Tue Sep 19 12:17:10 2006
@@ -1,8 +1,8 @@
 <gbeans>
-    <gbean class="org.apache.geronimo.jetty.JettyContainerImpl" objectName="geronimo.web:type=WebContainer,container=Jetty">
+    <gbean class="org.apache.geronimo.jetty6.JettyContainerImpl" objectName="geronimo.web:type=WebContainer,container=Jetty">
     </gbean>
 
-    <gbean class="org.apache.geronimo.jetty.connector.HTTPConnector" objectName="geronimo.web:type=WebConnector,container=Jetty,port=8080">
+    <gbean class="org.apache.geronimo.jetty6.connector.HTTPConnector" objectName="geronimo.web:type=WebConnector,container=Jetty,port=8080">
         <default attribute="Port">5678</default>
         <endpoint name="JettyContainer">
             <pattern><gbean-name>geronimo.web:type=WebContainer,container=Jetty</gbean-name></pattern>

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/pom.xml?view=diff&rev=447933&r1=447932&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/pom.xml (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/pom.xml Tue Sep 19 12:17:10 2006
@@ -57,12 +57,18 @@
             <version>${pom.version}</version>
         </dependency>
          
-         <dependency>
+        <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-clustering</artifactId>
             <version>${pom.version}</version>
         </dependency>
-        
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.modules</groupId>-->
+            <!--<artifactId>geronimo-clustering-wadi</artifactId>-->
+            <!--<version>${pom.version}</version>-->
+            <!--<scope>test</scope>-->
+        <!--</dependency>-->
+
         <dependency>
             <groupId>org.mortbay.jetty</groupId>
             <artifactId>jetty</artifactId>

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/Host.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/Host.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/Host.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/Host.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/Host.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/Host.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/Host.java Tue Sep 19 12:17:10 2006
@@ -1,10 +1,10 @@
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 
 /**
- * Host gbean for jetty containing an array of hosts and virtual hosts
+ * Host gbean for jetty6 containing an array of hosts and virtual hosts
  */
 public class Host {
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.security.AccessControlContext;
 import java.security.AccessControlException;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyPrincipal.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyPrincipal.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyPrincipal.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyPrincipal.java Tue Sep 19 12:17:10 2006
@@ -14,10 +14,9 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.security.Principal;
-import java.util.Stack;
 import javax.security.auth.Subject;
 
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyRealm.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyRealm.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyRealm.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyRealm.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyRealm.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JAASJettyRealm.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JAASJettyRealm.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.security.Principal;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainer.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainer.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainer.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainer.java Tue Sep 19 12:17:10 2006
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.mortbay.jetty.Connector;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainerImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainerImpl.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyContainerImpl.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyContainerImpl.java Tue Sep 19 12:17:10 2006
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -140,7 +140,7 @@
 //            stats.getActiveRequestCountImpl().setHighWaterMark(server.getRequestsActiveMax());
 
             /* set connection requests range values */
-//          stats.getConnectionRequestCountImpl().setCurrent(server.getConnectionsRequestsCurrent());    // temporarily removed until added by jetty
+//          stats.getConnectionRequestCountImpl().setCurrent(server.getConnectionsRequestsCurrent());    // temporarily removed until added by jetty6
 //            stats.getConnectionRequestCountImpl().setCurrent(server.getConnectionsOpen());
 //            stats.getConnectionRequestCountImpl().setLowWaterMark(server.getConnectionsRequestsMin());
 //            stats.getConnectionRequestCountImpl().setHighWaterMark(server.getConnectionsRequestsMax());
@@ -153,14 +153,14 @@
             /* set request duration time values */
 //            stats.getRequestDurationImpl().setMinTime(server.getRequestsDurationMin());
 //            stats.getRequestDurationImpl().setMaxTime(server.getRequestsDurationMax());
-//          stats.getRequestDurationImpl().setCount(server.getRequestsDurationCount());     // temporarily removed until added by jetty
+//          stats.getRequestDurationImpl().setCount(server.getRequestsDurationCount());     // temporarily removed until added by jetty6
             stats.getRequestDurationImpl().setCount(stats.getTotalRequestCount().getCount());
 //            stats.getRequestDurationImpl().setTotalTime(server.getRequestsDurationTotal());
 
             /* set connection duration Time values */
 //            stats.getConnectionDurationImpl().setMinTime(server.getConnectionsDurationMin());
 //            stats.getConnectionDurationImpl().setMaxTime(server.getConnectionsDurationMax());
-//          stats.getConnectionDurationImpl().setCount(server.getConnectionsDurationCount());    // temporarily removed until added by jetty
+//          stats.getConnectionDurationImpl().setCount(server.getConnectionsDurationCount());    // temporarily removed until added by jetty6
             stats.getConnectionDurationImpl().setCount(stats.getTotalConnectionCount().getCount());
 //            stats.getConnectionDurationImpl().setTotalTime(server.getConnectionsDurationTotal());
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyDefaultServletHolder.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java Tue Sep 19 12:17:10 2006
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.util.Map;
 import java.util.Set;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyEJBWebServiceContext.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterHolder.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterHolder.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.util.Map;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterMapping.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterMapping.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyFilterMapping.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java Tue Sep 19 12:17:10 2006
@@ -14,15 +14,16 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.io.Serializable;
 import java.util.Set;
+import java.util.Collection;
+import java.util.Iterator;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.mortbay.jetty.servlet.Dispatcher;
 import org.mortbay.jetty.servlet.FilterMapping;
 import org.mortbay.jetty.Handler;
 
@@ -37,7 +38,7 @@
     private final boolean includeDispatch;
     private final boolean errorDispatch;
     private final JettyFilterHolder jettyFilterHolder;
-    private final Set jettyServletHolders;
+    private final Collection jettyServletHolders;
     private final JettyFilterMapping previous;
     private final JettyServletRegistration jettyServletRegistration;
 
@@ -60,7 +61,7 @@
                               boolean includeDispatch,
                               boolean errorDispatch,
                               JettyFilterHolder jettyFilterHolder,
-                              Set jettyServletHolders,
+                              Collection jettyServletHolders,
                               JettyFilterMapping previous,
                               JettyServletRegistration jettyServletRegistration) {
        this.urlPatterns = urlPatterns;
@@ -95,8 +96,15 @@
             setFilterName(filterName);
             setDispatches(dispatches);
             setPathSpecs(urlPatterns);
-            if (jettyServletHolders != null)
-                setServletNames((String[])jettyServletHolders.toArray(new String[0]));
+            if (jettyServletHolders != null) {
+                String[] servletNames = new String[jettyServletHolders.size()];
+                int i = 0;
+                for (Iterator iterator = jettyServletHolders.iterator(); iterator.hasNext();) {
+                    JettyServletHolder jettyServletHolder = (JettyServletHolder) iterator.next();
+                    servletNames[i++] = jettyServletHolder.getServletName();
+                }
+                setServletNames(servletNames);
+            }
 
             (jettyServletRegistration.getServletHandler()).addFilterMapping(this);
         }
@@ -126,7 +134,7 @@
         return jettyFilterHolder;
     }
 
-    public Set getServlets() {
+    public Collection getServlets() {
         return jettyServletHolders;
     }
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyManagerImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyManagerImpl.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyManagerImpl.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -30,11 +30,11 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.jetty.connector.AJP13Connector;
-import org.apache.geronimo.jetty.connector.HTTPConnector;
-import org.apache.geronimo.jetty.connector.HTTPSConnector;
-import org.apache.geronimo.jetty.connector.JettyConnector;
-import org.apache.geronimo.jetty.requestlog.JettyLogManager;
+import org.apache.geronimo.jetty6.connector.AJP13Connector;
+import org.apache.geronimo.jetty6.connector.HTTPConnector;
+import org.apache.geronimo.jetty6.connector.HTTPSConnector;
+import org.apache.geronimo.jetty6.connector.JettyConnector;
+import org.apache.geronimo.jetty6.requestlog.JettyLogManager;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.io.IOException;
 import java.util.Map;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecureConnector.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecureConnector.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecureConnector.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecureConnector.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecureConnector.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecureConnector.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecureConnector.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.apache.geronimo.management.geronimo.SecureConnector;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecurityHandler.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecurityHandler.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettySecurityHandler.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.io.IOException;
 import java.security.AccessControlContext;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServer.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServer.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServer.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServer.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServer.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServer.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServer.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.security.UserRealm;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletHolder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletHolder.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletHolder.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.io.IOException;
 import java.util.Map;
@@ -118,7 +118,7 @@
      * Provide the thread's current JettyServletHolder
      *
      * @return the thread's current JettyServletHolder
-     * @see org.apache.geronimo.jetty.JAASJettyRealm#isUserInRole(java.security.Principal, java.lang.String)
+     * @see org.apache.geronimo.jetty6.JAASJettyRealm#isUserInRole(java.security.Principal, java.lang.String)
      */
     static String getCurrentServletName() {
         return (String) currentServletName.get();

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletRegistration.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletRegistration.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletRegistration.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletRegistration.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletRegistration.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyServletRegistration.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletRegistration.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.util.Set;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyThreadPool.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyThreadPool.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyThreadPool.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyThreadPool.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyThreadPool.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyThreadPool.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyThreadPool.java Tue Sep 19 12:17:10 2006
@@ -1,7 +1,5 @@
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.mortbay.thread.ThreadPool;
 
 /**

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebAppContext.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebAppContext.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java Tue Sep 19 12:17:10 2006
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -42,10 +42,10 @@
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.InvalidObjectNameException;
-import org.apache.geronimo.jetty.interceptor.BeforeAfter;
-import org.apache.geronimo.jetty.interceptor.ComponentContextBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.InstanceContextBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.ThreadClassloaderBeforeAfter;
+import org.apache.geronimo.jetty6.interceptor.BeforeAfter;
+import org.apache.geronimo.jetty6.interceptor.ComponentContextBeforeAfter;
+import org.apache.geronimo.jetty6.interceptor.InstanceContextBeforeAfter;
+import org.apache.geronimo.jetty6.interceptor.ThreadClassloaderBeforeAfter;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.ObjectNameUtil;
 import org.apache.geronimo.management.J2EEApplication;
@@ -59,7 +59,6 @@
 import org.mortbay.jetty.Request;
 import org.mortbay.jetty.Response;
 import org.mortbay.jetty.security.Authenticator;
-import org.mortbay.jetty.security.SecurityHandler;
 import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.ServletHolder;
 import org.mortbay.jetty.servlet.ServletMapping;
@@ -135,7 +134,6 @@
             Map tagLibMap,
             int sessionTimeoutSeconds,
             SessionHandlerFactory handlerFactory,
-//            HandleInterceptor handleInterceptor,
 
             String policyContextID,
             String securityRealmName,
@@ -157,13 +155,9 @@
         assert transactionManager != null;
         assert trackedConnectionAssociator != null;
         assert jettyContainer != null;
-        //TODO get the SessionHandler from some clustering factory.
-        SessionHandler sessionHandler = null;
+        SessionHandler sessionHandler = handlerFactory == null? null: handlerFactory.createHandler();
         //TODO construct an interceptor chain inside one of the Handlers.
-        //TODO determine if we should construct a JettySecurityHandler if there is no security
         JettySecurityHandler securityHandler = null;
-//JACC
-
         if (securityRealmName != null) {
             securityHandler = new JettySecurityHandler();
             InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
@@ -173,7 +167,6 @@
 
             securityHandler.init(policyContextID, defaultPrincipal, checkedPermissions, excludedPermissions, classLoader);
         }
-//      end JACC
         this.webAppContext = new WebAppContext(securityHandler, sessionHandler, null, null);
 
         this.server = server;
@@ -422,7 +415,7 @@
     }
 
 
-    //TODO this is really dumb, but jetty likes to set the displayname to null frequently.
+    //TODO this is really dumb, but jetty6 likes to set the displayname to null frequently.
     public String getDisplayName() {
         return displayName;
     }
@@ -533,7 +526,7 @@
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("Jetty WebApplication Context", JettyWebAppContext.class, NameFactory.WEB_MODULE);
         infoBuilder.addAttribute("deploymentDescriptor", String.class, true);
-        //from jetty's webapp context
+        //from jetty6's webapp context
 
         infoBuilder.addAttribute("displayName", String.class, true);
         infoBuilder.addAttribute("contextParamMap", Map.class, true);
@@ -579,7 +572,6 @@
 
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addAttribute("objectName", String.class, false);
-        infoBuilder.addAttribute("serverObjectName", String.class, false);
         infoBuilder.addAttribute("application", String.class, false);
         infoBuilder.addAttribute("javaVMs", String[].class, false);
         infoBuilder.addAttribute("servlets", String[].class, false);

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebConnector.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebConnector.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebConnector.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebConnector.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebConnector.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebConnector.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebConnector.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.apache.geronimo.management.geronimo.WebConnector;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStats.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStats.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStats.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStats.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStats.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStats.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStats.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.apache.geronimo.management.geronimo.stats.WebContainerStats;
 

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStatsImpl.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStatsImpl.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStatsImpl.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebContainerStatsImpl.java Tue Sep 19 12:17:10 2006
@@ -1,4 +1,4 @@
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import javax.management.j2ee.statistics.CountStatistic;
 import javax.management.j2ee.statistics.RangeStatistic;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/NonAuthenticator.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/NonAuthenticator.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/NonAuthenticator.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/NonAuthenticator.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/NonAuthenticator.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/NonAuthenticator.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/NonAuthenticator.java Tue Sep 19 12:17:10 2006
@@ -1,4 +1,4 @@
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.mortbay.jetty.security.Authenticator;
 import org.mortbay.jetty.security.UserRealm;

Copied: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/SessionHandlerFactory.java (from r447903, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/SessionHandlerFactory.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/SessionHandlerFactory.java?view=diff&rev=447933&p1=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/SessionHandlerFactory.java&r1=447903&p2=geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/SessionHandlerFactory.java&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty/SessionHandlerFactory.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/SessionHandlerFactory.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty;
+package org.apache.geronimo.jetty6;
 
 import org.mortbay.jetty.servlet.SessionHandler;
 

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty.cluster;
+package org.apache.geronimo.jetty6.cluster;
 
 import java.io.IOException;
 

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandler.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandler.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandler.java Tue Sep 19 12:17:10 2006
@@ -14,9 +14,8 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty.cluster;
+package org.apache.geronimo.jetty6.cluster;
 
-import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.SessionHandler;
 
 /**

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandlerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandlerFactory.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandlerFactory.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionHandlerFactory.java Tue Sep 19 12:17:10 2006
@@ -14,13 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty.cluster;
+package org.apache.geronimo.jetty6.cluster;
 
 import org.apache.geronimo.clustering.SessionManager;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.jetty.SessionHandlerFactory;
+import org.apache.geronimo.jetty6.SessionHandlerFactory;
 import org.mortbay.jetty.servlet.SessionHandler;
 
 /**

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty.cluster;
+package org.apache.geronimo.jetty6.cluster;
 
 import java.io.BufferedReader;
 import java.io.IOException;

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/AJP13Connector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/AJP13Connector.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/AJP13Connector.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/AJP13Connector.java Tue Sep 19 12:17:10 2006
@@ -15,11 +15,11 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty.connector;
+package org.apache.geronimo.jetty6.connector;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.jetty.JettyContainer;
+import org.apache.geronimo.jetty6.JettyContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
 
 /**

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/GeronimoSSLListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/GeronimoSSLListener.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/GeronimoSSLListener.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/GeronimoSSLListener.java Tue Sep 19 12:17:10 2006
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.jetty.connector;
+package org.apache.geronimo.jetty6.connector;
 
 import org.mortbay.jetty.security.SslSocketConnector;
 import org.apache.geronimo.management.geronimo.KeystoreManager;

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPConnector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPConnector.java?view=diff&rev=447933&r1=447903&r2=447933
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPConnector.java (original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPConnector.java Tue Sep 19 12:17:10 2006
@@ -15,11 +15,11 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.jetty.connector;
+package org.apache.geronimo.jetty6.connector;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.jetty.JettyContainer;
+import org.apache.geronimo.jetty6.JettyContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.mortbay.jetty.bio.SocketConnector;
 



Mime
View raw message