Search in sources :

Example 1 with BlockingPool

use of com.sun.ejb.containers.util.pool.BlockingPool in project Payara by payara.

the class StatelessSessionContainer method createBeanPool.

protected void createBeanPool() {
    ObjectFactory sessionCtxFactory = new SessionContextFactory();
    iased = ejbDescriptor.getIASEjbExtraDescriptors();
    if (iased != null) {
        beanPoolDes = iased.getBeanPool();
    }
    poolProp = new PoolProperties(ejbContainer, beanPoolDes);
    String val = ejbDescriptor.getEjbBundleDescriptor().getEnterpriseBeansProperty(SINGLETON_BEAN_POOL_PROP);
    if (poolProp.maxWaitTimeInMillis != -1) {
        pool = new BlockingPool(getContainerId(), ejbDescriptor.getName(), sessionCtxFactory, poolProp.steadyPoolSize, poolProp.poolResizeQuantity, poolProp.maxPoolSize, poolProp.poolIdleTimeoutInSeconds, loader, Boolean.parseBoolean(val), poolProp.maxWaitTimeInMillis);
    } else {
        pool = new NonBlockingPool(getContainerId(), ejbDescriptor.getName(), sessionCtxFactory, poolProp.steadyPoolSize, poolProp.poolResizeQuantity, poolProp.maxPoolSize, poolProp.poolIdleTimeoutInSeconds, loader, Boolean.parseBoolean(val));
    }
}
Also used : ObjectFactory(com.sun.ejb.containers.util.pool.ObjectFactory) NonBlockingPool(com.sun.ejb.containers.util.pool.NonBlockingPool) BlockingPool(com.sun.ejb.containers.util.pool.BlockingPool) NonBlockingPool(com.sun.ejb.containers.util.pool.NonBlockingPool)

Aggregations

BlockingPool (com.sun.ejb.containers.util.pool.BlockingPool)1 NonBlockingPool (com.sun.ejb.containers.util.pool.NonBlockingPool)1 ObjectFactory (com.sun.ejb.containers.util.pool.ObjectFactory)1