Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.RequestProcessing


    /**
    * Get the request-processing thread-count attribute from domain.xml.
    * return null if not found
    */    
    private String getRequestProcessingThreadCountStringFromConfig() {
        RequestProcessing requestProcessingBean = this.getRequestProcessing();
        if(requestProcessingBean == null) {
            return null;
        }
        return requestProcessingBean.getThreadCount();
    }
View Full Code Here


     *
     * @param httpService http-service config to use
     */
    protected void configureRequestProcessing(HttpService httpService){

        RequestProcessing rp = httpService.getRequestProcessing();
        Connector[] connectors = (Connector[])_embedded.findConnectors();      
                   
        for (int i=0; i < connectors.length; i++){   
            configureRequestProcessing(rp,(PECoyoteConnector)connectors[i]);
        }
View Full Code Here

            }
        }, httpService);
    }

    private void migrateRequestProcessing(NetworkConfig config, HttpService httpService) throws TransactionFailure {
        final RequestProcessing request = httpService.getRequestProcessing();
        if (request == null) {
            return;
        }
        ConfigSupport.apply(new SingleConfigCode<ThreadPool>() {
            @Override
            public Object run(ThreadPool pool) throws PropertyVetoException {
                pool.setMaxThreadPoolSize(request.getThreadCount());
                pool.setMinThreadPoolSize(request.getInitialThreadCount());
                if (pool.getMinThreadPoolSize() == null || Integer.parseInt(pool.getMinThreadPoolSize()) < 2) {
                    pool.setMinThreadPoolSize("2");
                }
                return null;
            }
        }, habitat.getComponent(ThreadPool.class, HTTP_THREAD_POOL));
        for (NetworkListener listener : config.getNetworkListeners().getNetworkListener()) {
            ConfigSupport.apply(new SingleConfigCode<NetworkListener>() {
                @Override
                public Object run(NetworkListener param) {
                    param.setThreadPool(HTTP_THREAD_POOL);
                    return null;
                }
            }, listener);
        }
        for (Protocol protocol : config.getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if(http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        param.setHeaderBufferLengthBytes(request.getHeaderBufferLengthInBytes());
                        return null;
                    }
                }, http);
            }
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.RequestProcessing

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.