Package org.jboss.fresh.pool.pool.impl

Examples of org.jboss.fresh.pool.pool.impl.PoolImpl


    // create pool instance.
    // set factory

    try {

      PoolImpl pool = (PoolImpl) getServiceObject();

      if (pool != null) pool.stop();

      String fname = getFactoryName();
      ClassLoader cl = Thread.currentThread().getContextClassLoader();

      Class fc = cl.loadClass(fname);
      PoolFactory f = (PoolFactory) fc.newInstance();

      pool = new PoolImpl(poolname, f);
      pool.setMinSize(minsize);
      pool.setMaxSize(maxsize);
      pool.setNonBlocking(!isBlocking);
      pool.setTimeout(blockingTimeout); // why is it int ???

      pool.start();

      setServiceObject(pool);

      return pool;
View Full Code Here


    try {
      log.debug("doStop() called");
      super.doStop();
    } finally {
      try {
        PoolImpl pool = (PoolImpl) getServiceObject();
        log.info("pool: " + pool);
        if (pool != null) pool.stop();
      } catch (Exception ex) {
        log.error("Exception while stopping the pool: ", ex);
        throw new RuntimeException(ex.toString());
      }
    }
View Full Code Here

TOP

Related Classes of org.jboss.fresh.pool.pool.impl.PoolImpl

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.