Package org.apache.catalina

Examples of org.apache.catalina.Executor


        if (wrappedConnector && this.connector.getState().equals(LifecycleState.STARTED)) {
            return;
        }

        String executorName=null;
        Executor executor=null;

        if (this.connector.getAttribute("executor") != null) {

            Object value = connector.getAttribute("executor");
            if (value == null)
                executorName=null;

            if (value instanceof String)
                executorName= (String)value;

            if(value instanceof Executor){
                executorName= ((Executor) value).getName();
            }

            executor = TomcatServerGBean.executors.get(executorName);

            if (executor == null) {

                log.warn("No executor found with name:" + executorName+", trying to get default executor with name 'DefaultThreadPool'");
                executor = TomcatServerGBean.executors.get("DefaultThreadPool");
            }


        } else {

            executor = TomcatServerGBean.executors.get("DefaultThreadPool");

            if (executor == null) {

                log.warn("No executor found in service with name: DefaultThreadPool");

            }
        }


        if (executor != null)

        {
            log.info("executor:"+executor.getName()+" found, set it to connector:"+this.getName() );

            try {

                IntrospectionUtils.callMethod1(this.connector.getProtocolHandler(),
                                                "setExecutor",
View Full Code Here


        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        Service service = (Service) recipe.create(cl);
        for (ExecutorType executorType: getExecutor()) {
            Executor executor = executorType.getExecutor(cl, kernel);
            service.addExecutor(executor);
            TomcatServerGBean.executors.put(executor.getName(), executor);
        }
        for (ConnectorType connectorType: getConnector()) {
            Connector connector = connectorType.getConnector(cl, service);
            service.addConnector(connector);
        }
View Full Code Here

        boolean executorSupported = !connector.getProtocolHandlerClassName().equals("org.apache.jk.server.JkCoyoteHandler");
        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
            String name = entry.getKey().getLocalPart();
            String value = entry.getValue();
            if (executorSupported && "executor".equals(name)) {
                Executor executor = service.getExecutor(entry.getValue());
                if (executor == null) {
                    throw new IllegalArgumentException("No executor found in service with name: " + value);
                }
                IntrospectionUtils.callMethod1(connector.getProtocolHandler(),
                        "setExecutor",
View Full Code Here

     *
     * @param attributes The attribute list of this element
     */
    public void begin(Attributes attributes) throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null setExecutor(con,ex);
View Full Code Here

        boolean executorSupported = !connector.getProtocolHandlerClassName().equals("org.apache.jk.server.JkCoyoteHandler");
        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
            String name = entry.getKey().getLocalPart();
            String value = entry.getValue();
            if (executorSupported && "executor".equals(name)) {
                Executor executor = service.getExecutor(entry.getValue());
                if (executor == null) {
                    throw new IllegalArgumentException("No executor found in service with name: " + value);
                }
                IntrospectionUtils.callMethod1(connector.getProtocolHandler(),
                        "setExecutor",
View Full Code Here

        if (wrappedConnector && this.connector.getState().equals(LifecycleState.STARTED)) {
            return;
        }

        String executorName=null;
        Executor executor=null;

        if (this.connector.getAttribute("executor") != null) {

            Object value = connector.getAttribute("executor");
            if (value == null)
                executorName=null;

            if (value instanceof String)
                executorName= (String)value;

            if(value instanceof Executor){
                executorName= ((Executor) value).getName();
            }

            executor = TomcatServerGBean.executors.get(executorName);

            if (executor == null) {

                log.warn("No executor found with name:" + executorName+", trying to get default executor with name 'DefaultThreadPool'");
                executor = TomcatServerGBean.executors.get("DefaultThreadPool");
            }


        } else {

            executor = TomcatServerGBean.executors.get("DefaultThreadPool");

            if (executor == null) {

                log.warn("No executor found in service with name: DefaultThreadPool");

            }
        }


        if (executor != null)

        {
            log.info("executor:"+executor.getName()+" found, set it to connector:"+this.getName() );

            try {

                IntrospectionUtils.callMethod1(this.connector.getProtocolHandler(),
                                                "setExecutor",
View Full Code Here

     *
     * @param attributes The attribute list of this element
     */
    public void begin(Attributes attributes) throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null _setExecutor(con,ex);
View Full Code Here

     */
    @Override
    public void begin(String namespace, String name, Attributes attributes)
            throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null _setExecutor(con,ex);
View Full Code Here

     */
    @Override
    public void begin(String namespace, String name, Attributes attributes)
            throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null _setExecutor(con,ex);
View Full Code Here

        if (wrappedConnector) {
            return;
        }

        String executorName=null;
        Executor executor=null;

        if (this.connector.getAttribute("executor") != null) {

            Object value = connector.getAttribute("executor");
            if (value == null)
                executorName=null;

            if (value instanceof String)
                executorName= (String)value;

            if(value instanceof Executor){
                executorName= ((Executor) value).getName();
            }

            executor = TomcatServerGBean.executors.get(executorName);

            if (executor == null) {

                log.warn("No executor found with name:" + executorName+", trying to get default executor with name 'DefaultThreadPool'");
                executor = TomcatServerGBean.executors.get("DefaultThreadPool");
            }


        } else {

            executor = TomcatServerGBean.executors.get("DefaultThreadPool");

            if (executor == null) {

                log.warn("No executor found in service with name: DefaultThreadPool");

            }
        }


        if (executor != null)

        {
            log.info("executor:"+executor.getName()+" found, set it to connector:"+this.getName() );

            try {

                IntrospectionUtils.callMethod1(this.connector.getProtocolHandler(),
                                                "setExecutor",
View Full Code Here

TOP

Related Classes of org.apache.catalina.Executor

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.