Package org.apache.catalina

Examples of org.apache.catalina.Container.addLifecycleListener()


            contained = (Container)Class.forName(type).newInstance();
            contained.setName(name);
           
            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }
View Full Code Here


            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }

        } catch (InstantiationException e) {
            throw new MBeanException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

    public void containerEvent(ContainerEvent event) {

        if (event.getType() == Container.ADD_CHILD_EVENT) {
            Container child = (Container) event.getData();
            child.addLifecycleListener(this);
            child.addContainerListener(this);
            if (child instanceof Host) {
                registerHost((Host) child);
            } else if (child instanceof Context) {
                registerContext((Context) child);
View Full Code Here

    public void containerEvent(ContainerEvent event) {

        if (event.getType() == Container.ADD_CHILD_EVENT) {
            Container child = (Container) event.getData();
            child.addLifecycleListener(this);
            child.addContainerListener(this);
            if (child instanceof Host) {
                registerHost((Host) child);
            } else if (child instanceof Context) {
                registerContext((Context) child);
View Full Code Here

            contained = (Container)Class.forName(type).newInstance();
            contained.setName(name);
           
            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }
View Full Code Here

            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }

        } catch (InstantiationException e) {
            throw new MBeanException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

    public void containerEvent(ContainerEvent event) {

        if (event.getType() == Container.ADD_CHILD_EVENT) {
            Container child = (Container) event.getData();
            child.addLifecycleListener(this);
            child.addContainerListener(this);
            if (child instanceof Host) {
                registerHost((Host) child);
            } else if (child instanceof Context) {
                registerContext((Context) child);
View Full Code Here

            contained = (Container)Class.forName(type).newInstance();
            contained.setName(name);

            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }
View Full Code Here

            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }

        } catch (InstantiationException e) {
            throw new MBeanException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

        }

        if(listener != null){
            try {
                Container container = (Container)getManagedResource();
                container.addLifecycleListener(listener);
            } catch (InstanceNotFoundException e) {
                throw new MBeanException(e);
            } catch (RuntimeOperationsException e) {
                throw new MBeanException(e);
            } catch (InvalidTargetObjectTypeException e) {
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.