Package org.apache.catalina

Examples of org.apache.catalina.LifecycleException


        }
        if( !initialized ) {
            try {
                init();
            } catch( Exception ex ) {
                throw new LifecycleException("Error initializaing ", ex);
            }
        }
        if(log.isDebugEnabled())
            log.debug("Starting " + ("".equals(getName()) ? "ROOT" : getName()));
View Full Code Here


                                       System.getProperty("catalina.base"));

        try {
            protocolHandler.init();
        } catch (Exception e) {
            throw new LifecycleException
                (sm.getString
                 ("coyoteConnector.protocolHandlerInitializationFailed", e));
        }
    }
View Full Code Here

            String errPrefix = "";
            if(this.service != null) {
                errPrefix += "service.getName(): \"" + this.service.getName() + "\"; ";
            }

            throw new LifecycleException
                (errPrefix + " " + sm.getString
                 ("coyoteConnector.protocolHandlerStartFailed", e));
        }

        if( this.domain != null ) {
View Full Code Here

                    ("coyoteConnector.protocolUnregistrationFailed"), e);
        }
        try {
            protocolHandler.destroy();
        } catch (Exception e) {
            throw new LifecycleException
                (sm.getString
                 ("coyoteConnector.protocolHandlerDestroyFailed", e));
        }

    }
View Full Code Here

            channel.start(channelStartOptions);
            if (clusterDeployer != null) clusterDeployer.start();
            registerMember(channel.getLocalMember(false));
        } catch (Exception x) {
            log.error("Unable to start cluster.", x);
            throw new LifecycleException(x);
        }

        setState(LifecycleState.STARTING);
    }
View Full Code Here

     * 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 (IOException e) {
            throw new LifecycleException("Error creating server socket",e);
        }
    }
View Full Code Here

    /**
     * Start accepting connections by this <code>Connector</code>.
     */
    public void start() throws LifecycleException {
        if (!initialized) this.initialize();
        if (started) throw new LifecycleException("Already started");

        // Can't get a hold of a server socket
        if (this.server==null)
            throw new LifecycleException("Server socket not created");

        lifecycle.fireLifecycleEvent(START_EVENT, null);

        this.started = true;

View Full Code Here

    /**
     * Stop accepting connections by this <code>Connector</code>.
     */
    public void stop() throws LifecycleException {
        if (!started) throw new LifecycleException("Not started");

        lifecycle.fireLifecycleEvent(STOP_EVENT, null);

        this.started = false;

View Full Code Here

                addValve(defaultSubjectValve);
            } 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

    protected synchronized void startInternal() throws LifecycleException {
       
        try {
            open() ;       
        } catch (SQLException e) {
            throw new LifecycleException(e);
        }

        setState(LifecycleState.STARTING);
    }
View Full Code Here

TOP

Related Classes of org.apache.catalina.LifecycleException

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.