Examples of LifecycleException


Examples of org.apache.catalina.LifecycleException

   {
      log_.debug("Stopping JBossManager");

      // Validate and update our current component state
      if (!started_)
         throw new LifecycleException
            ("JBossManager notStarted");
      lifecycle_.fireLifecycleEvent(STOP_EVENT, null);
      started_ = false;

      // unregister from the MBeanServer
View Full Code Here

Examples of org.apache.catalina.LifecycleException

            server.addNotificationListener(TomcatDeployer.TOMCAT_SERVICE_NAME, this, null, null);
         }
      }
      catch (Exception e)
      {
         throw new LifecycleException(e);
      }
     
      // Handle re-entrance
      if (!this.semaphore.tryAcquire())
      {
View Full Code Here

Examples of org.apache.catalina.LifecycleException

            server.removeNotificationListener(TomcatDeployer.TOMCAT_SERVICE_NAME, this);
         }
      }
      catch (Exception e)
      {
         throw new LifecycleException(e);
      }
     
      // Handle re-entrance
      if (this.semaphore.tryAcquire())
      {
         try
         {
            log_.debug("Closing off LockingValve");
           
            // Acquire all remaining permits, shutting off locking valve
            this.semaphore.acquire(TOTAL_PERMITS - 1);
         }
         catch (InterruptedException e)
         {
            Thread.currentThread().interrupt();
            this.semaphore.release();
           
            throw new LifecycleException(e);
         }
      }
     
      // Let subclasses clean up
      stopExtensions();
View Full Code Here

Examples of org.apache.catalina.LifecycleException

      }
      catch (Throwable t)
      {
         String str = "Problem starting DistributedCacheManager for HttpSession clustering";
         log_.error(str, t);
         throw new LifecycleException(str, t);
      }

      batchingManager = proxy_.getBatchingManager();
      if(batchingManager == null)
      {
         throw new LifecycleException("start(): Obtained null batchingManager");
      }
     
      try
      {        
         this.outdatedSessionChecker = initOutdatedSessionChecker();
         initializeUnloadedSessions();
        
         // Setup our SnapshotManager
         initSnapshotManager();

         // Add SnapshotValve and, if needed, JvmRouteValve and batch repl valve
         installValves();
        
         backgroundProcessAllowed.set(true);

         started_ = true;
        
         // Notify our interested LifecycleListeners
         lifecycle_.fireLifecycleEvent(AFTER_START_EVENT, this);
        
         // Let subclasses do what they want
         startExtensions();
        
         log_.debug("start(): DistributedCacheManager started");
      }
      catch (Exception e)
      {
         log_.error("Unable to start manager.", e);
         throw new LifecycleException(e);
      }
     
      registerManagerMBean();
   }
View Full Code Here

Examples of org.apache.catalina.LifecycleException

         proxy_.start();

         batchingManager = proxy_.getBatchingManager();
         if(batchingManager == null)
         {
            throw new LifecycleException("JBossCacheManager.start(): Obtain null batchingManager");
         }
        
         initializeUnloadedSessions();
        
         // Setup our SnapshotManager
         initSnapshotManager();
        
         // Add SnapshotValve and, if needed, JvmRouteValve and batch repl valve
         installValves();
        
         // Let subclasses do what they want
         startExtensions();

         log_.debug("start(): DistributedCacheManager started");        
      }
      catch (LifecycleException le)
      {
         throw le;
      }
      catch (Exception e)
      {
         log_.error("Unable to start manager.", e);
         throw new LifecycleException(e);
      }
   }
View Full Code Here

Examples of org.apache.catalina.LifecycleException

            props.put("db.username", user);
            props.put("db.password", password);
            oauthProvider = (OAuthProvider)constructor.newInstance(props);
            validator = new OAuthValidator(oauthProvider);
        } catch (Exception ex) {
            throw new LifecycleException("In memory OAuth DB can not be created " + ex.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.catalina.LifecycleException

        // Initialize some naming specific properties
        initNaming();

        // Validate and update our current component state
        if (started)
            throw new LifecycleException
                (sm.getString("embedded.alreadyStarted"));
        lifecycle.fireLifecycleEvent(START_EVENT, null);
        started = true;
        initialized = true;
View Full Code Here

Examples of org.apache.catalina.LifecycleException

        if( log.isDebugEnabled() )
            log.debug("Stopping embedded server");

        // Validate and update our current component state
        if (!started)
            throw new LifecycleException
                (sm.getString("embedded.notStarted"));
        lifecycle.fireLifecycleEvent(STOP_EVENT, null);
        started = false;

        // Stop our defined Connectors first
View Full Code Here

Examples of org.apache.catalina.LifecycleException

               
            } catch (IOException e) {
                if (e.getCause() instanceof LifecycleException) {
                    throw (LifecycleException) e.getCause();
                }
                throw new LifecycleException(e);
            } catch (ServletException e) {
                throw new LifecycleException(e);
            }
        } else
            super.start();
    }
View Full Code Here

Examples of org.apache.catalina.LifecycleException

     * Initialize this connector (create ServerSocket here!)
     */
    public void initialize()
    throws LifecycleException {
        if (initialized)
            throw new LifecycleException("Already initialized");
        this.initialized=true;

        // Get a hold on a server socket
        try {
            ServerSocketFactory fact=this.getFactory();
            int port=this.getPort();
            int accc=this.getAcceptCount();

            if (this.getAddress()==null) {
                this.server=fact.createSocket(port,accc);
            } else {
                InetAddress addr=InetAddress.getByName(this.getAddress());
                this.server=fact.createSocket(port,accc,addr);
            }
        } catch (Exception e) {
            throw new LifecycleException("Error creating server socket ("+
                e.getClass().getName()+")",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.