Java Code Examples for org.apache.catalina.Engine#start()

The following examples show how to use org.apache.catalina.Engine#start() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Embedded.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
/**
 * Add a new Engine to the set of defined Engines.
 *
 * @param engine The engine to be added
 */
public synchronized void addEngine(Engine engine) {

    if( log.isDebugEnabled() )
        log.debug("Adding engine (" + engine.getInfo() + ")");

    // Add this Engine to our set of defined Engines
    Engine results[] = new Engine[engines.length + 1];
    for (int i = 0; i < engines.length; i++)
        results[i] = engines[i];
    results[engines.length] = engine;
    engines = results;

    // Start this Engine if necessary
    if (getState().isAvailable()) {
        try {
            engine.start();
        } catch (LifecycleException e) {
            log.error("Engine.start", e);
        }
    }

    this.container = engine;
}
 
Example 2
Source File: Embedded.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
/**
 * Add a new Engine to the set of defined Engines.
 *
 * @param engine The engine to be added
 */
public synchronized void addEngine(Engine engine) {

    if( log.isDebugEnabled() )
        log.debug("Adding engine (" + engine.getInfo() + ")");

    // Add this Engine to our set of defined Engines
    Engine results[] = new Engine[engines.length + 1];
    for (int i = 0; i < engines.length; i++)
        results[i] = engines[i];
    results[engines.length] = engine;
    engines = results;

    // Start this Engine if necessary
    if (getState().isAvailable()) {
        try {
            engine.start();
        } catch (LifecycleException e) {
            log.error("Engine.start", e);
        }
    }

    this.container = engine;
}