Java Code Examples for org.apache.jasper.Constants#MAX_POOL_SIZE

The following examples show how to use org.apache.jasper.Constants#MAX_POOL_SIZE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TagHandlerPool.java    From Tomcat8-Source-Read with MIT License 6 votes vote down vote up
protected void init(ServletConfig config) {
    int maxSize = -1;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        try {
            maxSize = Integer.parseInt(maxSizeS);
        } catch (Exception ex) {
            maxSize = -1;
        }
    }
    if (maxSize < 0) {
        maxSize = Constants.MAX_POOL_SIZE;
    }
    this.handlers = new Tag[maxSize];
    this.current = -1;
    instanceManager = InstanceManagerFactory.getInstanceManager(config);
}
 
Example 2
Source File: PerThreadTagHandlerPool.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
@Override
protected void init(ServletConfig config) {
    maxSize = Constants.MAX_POOL_SIZE;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        maxSize = Integer.parseInt(maxSizeS);
        if (maxSize < 0) {
            maxSize = Constants.MAX_POOL_SIZE;
        }
    }

    perThread = new ThreadLocal<PerThreadData>() {
        @Override
        protected PerThreadData initialValue() {
            PerThreadData ptd = new PerThreadData();
            ptd.handlers = new Tag[maxSize];
            ptd.current = -1;
            perThreadDataVector.addElement(ptd);
            return ptd;
        }
    };
}
 
Example 3
Source File: TagHandlerPool.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
protected void init(ServletConfig config) {
    int maxSize = -1;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        try {
            maxSize = Integer.parseInt(maxSizeS);
        } catch (Exception ex) {
            maxSize = -1;
        }
    }
    if (maxSize < 0) {
        maxSize = Constants.MAX_POOL_SIZE;
    }
    this.handlers = new Tag[maxSize];
    this.current = -1;
    instanceManager = InstanceManagerFactory.getInstanceManager(config);
}
 
Example 4
Source File: PerThreadTagHandlerPool.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
@Override
protected void init(ServletConfig config) {
    maxSize = Constants.MAX_POOL_SIZE;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        maxSize = Integer.parseInt(maxSizeS);
        if (maxSize < 0) {
            maxSize = Constants.MAX_POOL_SIZE;
        }
    }

    perThread = new ThreadLocal<PerThreadData>() {
        @Override
        protected PerThreadData initialValue() {
            PerThreadData ptd = new PerThreadData();
            ptd.handlers = new Tag[maxSize];
            ptd.current = -1;
            perThreadDataVector.addElement(ptd);
            return ptd;
        }
    };
}
 
Example 5
Source File: TagHandlerPool.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
protected void init(ServletConfig config) {
    int maxSize = -1;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        try {
            maxSize = Integer.parseInt(maxSizeS);
        } catch (Exception ex) {
            maxSize = -1;
        }
    }
    if (maxSize < 0) {
        maxSize = Constants.MAX_POOL_SIZE;
    }
    this.handlers = new Tag[maxSize];
    this.current = -1;
    instanceManager = InstanceManagerFactory.getInstanceManager(config);
}
 
Example 6
Source File: PerThreadTagHandlerPool.java    From packagedrone with Eclipse Public License 1.0 6 votes vote down vote up
protected void init(ServletConfig config) {
    maxSize = Constants.MAX_POOL_SIZE;
    String maxSizeS = getOption(config, OPTION_MAXSIZE, null);
    if (maxSizeS != null) {
        maxSize = Integer.parseInt(maxSizeS);
        if (maxSize < 0) {
            maxSize = Constants.MAX_POOL_SIZE;
        }
    }

    perThread = new ThreadLocal<PerThreadData>() {
        protected PerThreadData initialValue() {
            PerThreadData ptd = new PerThreadData();
            ptd.handlers = new Tag[maxSize];
            ptd.current = -1;
            perThreadDataVector.addElement(ptd);
            return ptd;
        }
    };
}
 
Example 7
Source File: TagHandlerPool.java    From packagedrone with Eclipse Public License 1.0 6 votes vote down vote up
protected void init( ServletConfig config ) {
    int maxSize=-1;
    String maxSizeS=getOption(config, OPTION_MAXSIZE, null);
    if( maxSizeS != null ) {
        try {
            maxSize=Integer.parseInt(maxSizeS);
        } catch( Exception ex) {
            maxSize=-1;
        }
    }
    if( maxSize <0  ) {
        maxSize=Constants.MAX_POOL_SIZE;
    }
    this.handlers = new JspTag[maxSize];
    this.current = -1;

    this.resourceInjector = (ResourceInjector)
        config.getServletContext().getAttribute(
            Constants.JSP_RESOURCE_INJECTOR_CONTEXT_ATTRIBUTE);
}