Examples of ServletType


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

        // that each "previous" GBean is running before it starts any
        // other GBeans that reference it.  See also
        // o.a.g.jetty.JettyFilterMapping which provided the example
        // of how to do this.
        // http://issues.apache.org/jira/browse/GERONIMO-645
        ServletType previousServlet = null;
        for (Iterator servlets = loadOrder.iterator(); servlets.hasNext();) {
            ServletType servletType = (ServletType) servlets.next();
            addServlet(webModuleName, moduleFile, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, moduleJ2eeContext, earContext);
            previousServlet = servletType;
        }

        // JACC v1.0 secion B.19
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.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

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

        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

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

        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

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

        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

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

        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

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

        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.addNewLoadOnStartup().setBigIntegerValue(BigInteger.valueOf(order));
        }
        return s1;
    }
View Full Code Here

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

            //Handle the role permissions and webservices on the servlets.
            ServletType[] servletTypes = webApp.getServletArray();
            Map webServices = new HashMap();
            for (int i = 0; i < servletTypes.length; i++) {
                ServletType servletType = servletTypes[i];

                //Handle the Role Ref Permissions
                processRoleRefPermissions(servletType, securityRoles, rolePermissions);

                //Do we have webservices configured?
                if (portMap != null) {
                    //Check if the Servlet is a Webservice
                    String servletName = servletType.getServletName().getStringValue().trim();
                    if (portMap.containsKey(servletName)) {
                        //Yes, this servlet is a web service so let the web service builder
                        // deal with configuring the web service stack
                        String servletClassName = servletType.getServletClass().getStringValue().trim();
                        Object portInfo = portMap.get(servletName);
                        if (portInfo == null) {
                            throw new DeploymentException("No web service deployment info for servlet name " + servletName +" in web app "+module.getName());
                        }
View Full Code Here

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

            // Make sure that servlet mappings point to available servlets
            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());
            }
            //never add a duplicate pattern.
            Set knownServletMappings = new HashSet();

            ServletMappingType[] servletMappingArray = webApp.getServletMappingArray();
View Full Code Here

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

        // o.a.g.jetty.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, moduleFile, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, earContext);
        }

        // JACC v1.0 secion B.19
        addUnmappedJSPPermissions(securityRoles, rolePermissions);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.