Examples of Lifecycle


Examples of javax.faces.lifecycle.Lifecycle

     * @param phaseId
     *            The phase id that was executed
     */
    protected void informPhaseListenersAfter(FacesContext facesContext,
            PhaseId phaseId) {
        Lifecycle lifecycle = getLifecycle();
        PhaseListener[] phaseListeners = lifecycle.getPhaseListeners();
        for (int i = 0; i < phaseListeners.length; i++) {
            PhaseListener phaseListener = phaseListeners[i];
            int listenerPhaseId = phaseListener.getPhaseId().getOrdinal();
            if (listenerPhaseId == PhaseId.ANY_PHASE.getOrdinal()
                    || listenerPhaseId == phaseId.getOrdinal()) {
View Full Code Here

Examples of jfun.yan.lifecycle.Lifecycle

      //so cannot use singleton even if it carries no state.
      final Component factory =
        target.factory();
      final LifecycleManager man = super.getNutEnvironment()
      .getLifecycleManager();
      final Lifecycle lifecycle = new Lifecycle();
      lifecycle.put(phase, FactoryProcedure.instance(), isReentrant(phase));
      return man.withLifecycle(factory, lifecycle);
    }
  }
View Full Code Here

Examples of models.LifeCycle

        assertTrue(LifeCycle.q("foo", "bar").count() == 0);
    }
   
    @Test
    public void testExceptionsinBatchLifeCycleMethods() {
        LifeCycle lc0 = new LifeCycle();
        lc0.foo = "bar";
        lc0.bar = "order";
        lc0.save();
       
        LifeCycle lc1 = new LifeCycle();
        lc1.foo = "foo";
        lc1.bar = "order";
        lc1.save();
       
        MorphiaQuery q = LifeCycle.q("bar", "order");
        LifeCycle.batchDeleteFail = true;
        try {
            q.delete();
View Full Code Here

Examples of nexj.core.util.Lifecycle

   {
      super.begin();

      if (isContained() && J2EEUtil.CONTAINER == J2EEUtil.TEEE)
      {
         Lifecycle container = (Lifecycle)Class.forName("nexj.core.container.platform.teee.GenericContainerContainer")
            .newInstance();

         if (container instanceof Initializable)
         {
            ((Initializable)container).initialize();
View Full Code Here

Examples of org.apache.catalina.Lifecycle

      String type = event.getType();
      if (Lifecycle.BEFORE_STOP_EVENT.equals(type)
            || Lifecycle.STOP_EVENT.equals(type)
            || Lifecycle.AFTER_STOP_EVENT.equals(type))
      {
         Lifecycle source = event.getLifecycle();
         boolean removed;
         if (source instanceof ManagerBase)
         {
            removed = activeManagers.remove(((ManagerBase)source).getObjectName());
         }
         else if (source instanceof JBossManager)
         {
            removed = activeManagers.remove(((JBossManager)source).getObjectName());
         }
         else
         {
            removed = activeManagers.remove(source);
         }
        
         if (removed)
         {
            source.removeLifecycleListener(this);
           
            LOG.debug("ClusteredSSO: removed stopped " +
                                             "manager " + source.toString());           
         }
        
         // TODO consider getting the sessions and removing any from our sso's
         // Idea is to cleanup after managers that don't destroy sessions
        
View Full Code Here

Examples of org.apache.catalina.Lifecycle

      Object[] args = {};
      String[] sig = {};
      Connector[] connectors = (Connector[]) server.invoke(service, "findConnectors", args, sig);
      for (int n = 0; n < connectors.length; n++)
      {
         Lifecycle lc = connectors[n];
         lc.start();
      }
      connectorsRunning = true;

      // Notify listeners that connectors have started processing requests
      sendNotification(new Notification(TOMCAT_CONNECTORS_STARTED, this, getNextNotificationSequenceNumber()));
View Full Code Here

Examples of org.apache.catalina.Lifecycle

      }
     
      Container container = this.getContainer();
      if (container instanceof Lifecycle)
      {
         Lifecycle lifecycle = (Lifecycle) container;
         LifecycleListener[] listeners = lifecycle.findLifecycleListeners();
        
         // Remove existing listeners
         for (LifecycleListener listener: listeners)
         {
            lifecycle.removeLifecycleListener(listener);
         }
        
         // Register our listener first
         lifecycle.addLifecycleListener(this);
        
         // Re-register the old listeners
         for (LifecycleListener listener: listeners)
         {
            lifecycle.addLifecycleListener(listener);
         }
      }

      try
      {
View Full Code Here

Examples of org.apache.catalina.Lifecycle

   /** . */
   private TC6ServletContainerContext containerContext;

   public synchronized void lifecycleEvent(LifecycleEvent event)
   {
      Lifecycle lifecycle = event.getLifecycle();

      //
      if (lifecycle instanceof Server)
      {
         Server server = (Server)lifecycle;
View Full Code Here

Examples of org.apache.catalina.Lifecycle

      String type = event.getType();
      if (Lifecycle.BEFORE_STOP_EVENT.equals(type)
            || Lifecycle.STOP_EVENT.equals(type)
            || Lifecycle.AFTER_STOP_EVENT.equals(type))
      {
         Lifecycle source = event.getLifecycle();
         boolean removed;
         if (source instanceof ManagerBase)
         {
            removed = activeManagers.remove(((ManagerBase)source).getObjectName());
         }
         else if (source instanceof JBossManager)
         {
            removed = activeManagers.remove(((JBossManager)source).getObjectName());
         }
         else
         {
            removed = activeManagers.remove(source);
         }
        
         if (removed)
         {
            source.removeLifecycleListener(this);
           
            getContainer().getLogger().debug("ClusteredSSO: removed stopped " +
                                             "manager " + source.toString());           
         }
        
         // TODO consider getting the sessions and removing any from our sso's
         // Idea is to cleanup after managers that don't destroy sessions
        
View Full Code Here

Examples of org.apache.catalina.Lifecycle

            throw new LifecycleException(MESSAGES.failToStartManager(), e);
        }

        Container container = this.getContainer();
        if (container instanceof Lifecycle) {
            Lifecycle lifecycle = (Lifecycle) container;
            LifecycleListener[] listeners = lifecycle.findLifecycleListeners();

            // Remove existing listeners
            for (LifecycleListener listener : listeners) {
                lifecycle.removeLifecycleListener(listener);
            }

            // Register our listener first
            lifecycle.addLifecycleListener(this);

            // Re-register the old listeners
            for (LifecycleListener listener : listeners) {
                lifecycle.addLifecycleListener(listener);
            }
        }

        // Handle re-entrance
        if (!this.semaphore.tryAcquire()) {
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.