Package org.apache.catalina

Examples of org.apache.catalina.Lifecycle


     *
     * @param event The event that has occurred
     */
    public void lifecycleEvent(LifecycleEvent event) {

        Lifecycle lifecycle = event.getLifecycle();
        if (Lifecycle.START_EVENT.equals(event.getType())) {

            if (lifecycle instanceof Server) {

                // Loading additional MBean descriptors
View Full Code Here


      mod_jk = getWriter();
  } catch(IOException iex) {
      log("Unable to open config file");
      return;
  }
  Lifecycle who = evt.getLifecycle();
  if( who instanceof Server ) {
      executeServer((Server)who, mod_jk);
  } else if ( who instanceof Host ) {
      executeHost((Host)who, mod_jk);
  } else if( who instanceof Context ) {
View Full Code Here

      mod_jk = getWriter();
  } catch(IOException iex) {
      log("Unable to open config file");
      return;
  }
  Lifecycle who = evt.getLifecycle();
  if( who instanceof Server ) {
      executeServer((Server)who, mod_jk);
  } else if ( who instanceof Host ) {
      executeHost((Host)who, mod_jk);
  } else if( who instanceof Context ) {
View Full Code Here

      mod_jk = getWriter();
  } catch(IOException iex) {
      log("Unable to open config file");
      return;
  }
  Lifecycle who = evt.getLifecycle();
  if( who instanceof Server ) {
      executeServer((Server)who, mod_jk);
  } else if ( who instanceof Host ) {
      executeHost((Host)who, mod_jk);
  } else if( who instanceof Context ) {
View Full Code Here

     *
     * @param event The event that has occurred
     */
    public void lifecycleEvent(LifecycleEvent event) {

        Lifecycle lifecycle = event.getLifecycle();
        if (Lifecycle.START_EVENT.equals(event.getType())) {

            if (lifecycle instanceof Server) {

                // Loading additional MBean descriptors
View Full Code Here

        if (getCluster() != null) {
            engine.setCluster(getCluster().getCluster(cl));
        }
        //listener
        if (engine instanceof Lifecycle) {
            Lifecycle lifecycle = (Lifecycle) engine;
            for (ListenerType listenerType: getListener()) {
                LifecycleListener listener = listenerType.getLifecycleListener(cl);
                lifecycle.addLifecycleListener(listener);
            }
        }
        return engine;
    }
View Full Code Here

        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        Server instance = (Server) recipe.create(cl);
        instance.setPort(port);
        instance.setShutdown(shutdown);
        if (instance instanceof Lifecycle) {
            Lifecycle lifecycle = (Lifecycle) instance;
            for (ListenerType listenerType: getListener()) {
                LifecycleListener listener = listenerType.getLifecycleListener(cl);
                lifecycle.addLifecycleListener(listener);
            }
        }

        NamingResources globalNamingResources = new NamingResources();
        if(getGlobalNamingResources().size() > 0) {
View Full Code Here

        for (ConnectorType connectorType: getConnector()) {
            Connector connector = connectorType.getConnector(cl, service);
            service.addConnector(connector);
        }
        if (service instanceof Lifecycle) {
            Lifecycle lifecycle = (Lifecycle) service;
            for (ListenerType listenerType: getListener()) {
                LifecycleListener listener = listenerType.getLifecycleListener(cl);
                lifecycle.addLifecycleListener(listener);
            }
        }

        if (getEngine() != null) {
            Engine engine = getEngine().getEngine(cl);
View Full Code Here

                catalinaCluster.addClusterListener(clusterListener);
            }
        }
        // LifecycleListener
        if (cluster instanceof Lifecycle) {
            Lifecycle lifecycle = (Lifecycle) cluster;
            for (ListenerType listenerType : getListener()) {
                lifecycle.addLifecycleListener(listenerType.getLifecycleListener(cl));
            }
        }
        return cluster;
    }
View Full Code Here

        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        Host host = (Host) recipe.create(cl);
        if (host instanceof Lifecycle) {
            Lifecycle lifecycle = host;
            for (ListenerType listenerType : getListener()) {
                LifecycleListener listener = listenerType.getLifecycleListener(cl);
                lifecycle.addLifecycleListener(listener);
            }
        }
        //alias
        for (String alias : getAlias()) {
            host.addAlias(alias);
View Full Code Here

TOP

Related Classes of org.apache.catalina.Lifecycle

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.