Examples of LifecycleEvent


Examples of org.apache.catalina.LifecycleEvent

     * @param type Event type
     * @param data Event data
     */
    public void fireLifecycleEvent(String type, Object data) {

        LifecycleEvent event = new LifecycleEvent(lifecycle, type, data);
        LifecycleListener interested[] = listeners;
        for (int i = 0; i < interested.length; i++)
            interested[i].lifecycleEvent(event);

    }
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

        // prevent it from looking ( if it finds one - it'll have dup error )
        config1.setDefaultWebXml(Constants.NoDefaultWebXml);
        listener1[1] = config1;
        // Need to init since context won't call init
        config1.lifecycleEvent(
                new LifecycleEvent(ctx, Lifecycle.AFTER_INIT_EVENT, null));
        Tomcat.addServlet(ctx, "getresource", new GetResourceServlet());
        ctx.addServletMapping("/getresource", "getresource");

        ctx.start();
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

        // prevent it from looking ( if it finds one - it'll have dup error )
        config1.setDefaultWebXml(Constants.NoDefaultWebXml);
        listener1[1] = config1;
        // Need to init since context won't call init
        config1.lifecycleEvent(
                new LifecycleEvent(ctx, Lifecycle.AFTER_INIT_EVENT, null));
        Tomcat.addServlet(ctx, "getresource", new GetResourceServlet());
        ctx.addServletMapping("/getresource", "getresource");

        ctx.start();
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

        sl = new StartupListener();
        marmotta = new MarmottaContext();
    }
   
    public void testLifecycleEvent() {
        sl.lifecycleEvent(new LifecycleEvent(marmotta, Lifecycle.AFTER_START_EVENT, null));
    }
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

     * @param type Event type
     * @param data Event data
     */
    public void fireLifecycleEvent(String type, Object data) {

        LifecycleEvent event = new LifecycleEvent(lifecycle, type, data);
        LifecycleListener interested[] = null;
        synchronized (listeners) {
            interested = (LifecycleListener[]) listeners.clone();
        }
        for (int i = 0; i < interested.length; i++)
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

        filterStop();

        if (isUseNaming()) {
            // Start
            namingContextListener.lifecycleEvent
                (new LifecycleEvent(this, Lifecycle.STOP_EVENT));
        }

        // Binding thread
        unbindThread(oldCCL);

        // Shut down our application class loader
        if ((loader != null) && (loader instanceof Lifecycle)) {
            try {
                ((Lifecycle) loader).stop();
            } catch (LifecycleException e) {
                log(sm.getString("standardContext.stoppingLoader"), e);
            }
        }

        // Binding thread
        oldCCL = bindThread();

        // Restart our application class loader
        if ((loader != null) && (loader instanceof Lifecycle)) {
            try {
                ((Lifecycle) loader).start();
            } catch (LifecycleException e) {
                log(sm.getString("standardContext.startingLoader"), e);
            }
        }

        // Binding thread
        unbindThread(oldCCL);

        // Create and register the associated naming context, if internal
        // naming is used
        boolean ok = true;
        if (isUseNaming()) {
            // Start
            namingContextListener.lifecycleEvent
                (new LifecycleEvent(this, Lifecycle.START_EVENT));
        }

        // Binding thread
        oldCCL = bindThread();
View Full Code Here

Examples of org.apache.catalina.LifecycleEvent

        filterStop();

        if (isUseNaming()) {
            // Start
            namingContextListener.lifecycleEvent
                (new LifecycleEvent(this, Lifecycle.STOP_EVENT));
        }

        // Binding thread
        unbindThread(oldCCL);

        // Shut down our application class loader
        if ((loader != null) && (loader instanceof Lifecycle)) {
            try {
                ((Lifecycle) loader).stop();
            } catch (LifecycleException e) {
                log(sm.getString("standardContext.stoppingLoader"), e);
            }
        }

        // Binding thread
        oldCCL = bindThread();

        // Restart our application class loader
        if ((loader != null) && (loader instanceof Lifecycle)) {
            try {
                ((Lifecycle) loader).start();
            } catch (LifecycleException e) {
                log(sm.getString("standardContext.startingLoader"), e);
            }
        }

        // Binding thread
        unbindThread(oldCCL);

        // Create and register the associated naming context, if internal
        // naming is used
        boolean ok = true;
        if (isUseNaming()) {
            // Start
            namingContextListener.lifecycleEvent
                (new LifecycleEvent(this, Lifecycle.START_EVENT));
        }

        // Binding thread
        oldCCL = bindThread();
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.events.LifeCycleEvent

        fireEvent(type, false);
    }

    protected void fireEvent(LifeCycleEvent.LifeCycleEventType type, boolean force) throws JBIException {
        if (listenerRegistry != null) {
            LifeCycleEvent event = null;
            for (LifeCycleListener listener : listenerRegistry.getListeners(LifeCycleListener.class)) {
                if (event == null) {
                    event = new LifeCycleEvent(type, this, force);
                }
                listener.lifeCycleChanged(event);
            }
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.events.LifeCycleEvent

        fireEvent(type, false);
    }

    protected void fireEvent(LifeCycleEvent.LifeCycleEventType type, boolean force) throws JBIException {
        if (listenerRegistry != null) {
            LifeCycleEvent event = null;
            for (LifeCycleListener listener : listenerRegistry.getListeners(LifeCycleListener.class)) {
                if (event == null) {
                    event = new LifeCycleEvent(type, this, force);
                }
                listener.lifeCycleChanged(event);
            }
        }
    }
View Full Code Here

Examples of org.apache.tomcat.LifecycleEvent

     * @param type Event type
     * @param data Event data
     */
    protected void fireLifecycleEvent(String type, Object data) {

  LifecycleEvent event = new LifecycleEvent(this, type, data);
  Vector list = null;
  synchronized (this) {
      list = (Vector) listeners.clone();
  }
  for (int i = 0; i < list.size(); i++)
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.