Package org.apache.geronimo.xbeans.javaee

Examples of org.apache.geronimo.xbeans.javaee.ServletType


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);
    }
View Full Code Here


        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

        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);
    }
View Full Code Here

        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;
    }
View Full Code Here

                }

                LOG.debug("Discovered POJO Web Service: " + service.getName());
               
                // add new <servlet/> element
                ServletType servlet = webApp.addNewServlet();
                servlet.addNewServletName().setStringValue(service.getName());
                servlet.addNewServletClass().setStringValue(service.getName());

                // add new <servlet-mapping/> element
                String location = "/" + JAXWSUtils.getServiceName(service);
                ServletMappingType servletMapping = webApp.addNewServletMapping();
                servletMapping.addNewServletName().setStringValue(service.getName());
View Full Code Here

        // o.a.g.jetty6.JettyFilterMapping which provided the example
        // of how to do this.
        // http://issues.apache.org/jira/browse/GERONIMO-645
        AbstractName previousServlet = null;
        for (Object aLoadOrder : loadOrder) {
            ServletType servletType = (ServletType) aLoadOrder;
            previousServlet = addServlet(webModuleName, module, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, moduleContext);
        }

        // JACC v1.0 secion B.19
        addUnmappedJSPPermissions(securityRoles, rolePermissions);
View Full Code Here

    private Map buildServletMappings(Module module, WebAppType webApp, Map servletMappings, Set knownServletMappings) throws DeploymentException {
        ServletType[] servletTypes = webApp.getServletArray();
        Set knownServlets = new HashSet();
        for (int i = 0; i < servletTypes.length; i++) {
            ServletType type = servletTypes[i];
            knownServlets.add(type.getServletName().getStringValue().trim());
        }

        ServletMappingType[] servletMappingArray = webApp.getServletMappingArray();
        for (int i = 0; i < servletMappingArray.length; i++) {
            ServletMappingType servletMappingType = servletMappingArray[i];
View Full Code Here

        // o.a.g.jetty6.JettyFilterMapping which provided the example
        // of how to do this.
        // http://issues.apache.org/jira/browse/GERONIMO-645
        AbstractName previousServlet = null;
        for (Iterator servlets = loadOrder.iterator(); servlets.hasNext();) {
            ServletType servletType = (ServletType) servlets.next();
            previousServlet = addServlet(webModuleName, module, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, moduleContext);
        }

        // JACC v1.0 secion B.19
        addUnmappedJSPPermissions(securityRoles, rolePermissions);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee.ServletType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.