Package com.icentris.sql

Examples of com.icentris.sql.ConnectionPool


        throw new IllegalStateException("cannot find WEB-INF/classes/db.properties!");
      }
      stream = propsURL.openStream();
      dbProps.load(stream);
      PropertiesUtil.interpolateProperties(dbProps);
      ConnectionPool pool = new ConnectionPool( dbProps.getProperty("dbDriver"), dbProps.getProperty("dbUrl"),
                                                dbProps.getProperty("dbUser"),   dbProps.getProperty("dbPass") );
      pool.setMaxConnections  ( Integer.parseInt(dbProps.getProperty("maxConnections"))   );
      pool.setMinConnections  ( Integer.parseInt(dbProps.getProperty("minConnections"))   );
      pool.setTimeoutInMinutes( Integer.parseInt(dbProps.getProperty("timeoutInMinutes")) );
      pool.setStrictTimeout   ( "true".equals(dbProps.getProperty("strictTimeout"))       );
      pool.setCloseOnError    ( "true".equals(dbProps.getProperty("closeOnError"))        );
      pool.setShowDebugging   ( "true".equals(dbProps.getProperty("showDebugging"))       );
      pool.setCallersToIgnore ( PropertiesUtil.getArray("callersToIgnore", ',', dbProps)  );
      double pruneRunInMins = Double.parseDouble( dbProps.getProperty("pruneRunInMinutes") );
      if ( pruneRunInMins > -1 ) {
        pool.startPruner( pruneRunInMins );
      }
      ConnectionPool.initializePool("default", pool);
     
    } catch ( Exception e ) {
         logger.error("init(ServletConfig)", e); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of com.icentris.sql.ConnectionPool

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.