Package org.apache.geronimo.tomcat.model

Examples of org.apache.geronimo.tomcat.model.ServerType


    public void testLoadServer1() throws Exception {
        File server1 = resolveFile(SERVER_1);
        FileReader in = new FileReader(server1);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            assertEquals(4, serverType.getListener().size());
            Server server = serverType.build(getClass().getClassLoader(), null);
            try {
                ((Lifecycle) server).start();
            } finally {
                ((Lifecycle) server).stop();
            }
View Full Code Here


    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
        }
    }
View Full Code Here

            serverConfig = attributeStore.substitute(serverConfig);
        }
        Reader in = new StringReader(serverConfig);

        try {
            ServerType serverType = loadServerType(in);           
            server = serverType.build(classLoader, kernel);
        } finally {
            in.close();
        }
    }
View Full Code Here

    static ServerType loadServerType(Reader in) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException {
        Unmarshaller unmarshaller = SERVER_CONTEXT.createUnmarshaller();
        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
        JAXBElement<ServerType> element = unmarshaller.unmarshal(xmlStream, ServerType.class);
        ServerType serverType = element.getValue();
        return serverType;
    }
View Full Code Here

    public void testLoadServer1() throws Exception {
        File server1 = resolveFile(SERVER_1);
        FileReader in = new FileReader(server1);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            assertEquals(3, serverType.getListener().size());
            Server server = serverType.build(getClass().getClassLoader(), null);
            try {
                ((Lifecycle) server).start();
            } finally {
                ((Lifecycle) server).stop();
            }
View Full Code Here

    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
        }
    }
View Full Code Here

            serverConfig = attributeStore.substitute(serverConfig);
        }
        Reader in = null;
        try {
            in = new StringReader(serverConfig);
            ServerType serverType = loadServerType(in);
            server = serverType.build(classLoader, kernel);
        } finally {
            IOUtils.close(in);
        }
    }
View Full Code Here

    static ServerType loadServerType(Reader in) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException {
        Unmarshaller unmarshaller = SERVER_CONTEXT.createUnmarshaller();
        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
        JAXBElement<ServerType> element = unmarshaller.unmarshal(xmlStream, ServerType.class);
        ServerType serverType = element.getValue();
        return serverType;
    }
View Full Code Here

        if (attributeStore != null) {
            serverConfig = attributeStore.substitute(serverConfig);
        }
        Reader in = new StringReader(serverConfig);
        try {
            ServerType serverType = loadServerType(in);
            server = serverType.build(classLoader, kernel);
        } finally {
            in.close();
        }
    }
View Full Code Here

    static ServerType loadServerType(Reader in) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException {
        Unmarshaller unmarshaller = SERVER_CONTEXT.createUnmarshaller();
        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
        JAXBElement<ServerType> element = unmarshaller.unmarshal(xmlStream, ServerType.class);
        ServerType serverType = element.getValue();
        return serverType;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.tomcat.model.ServerType

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.