Tabnine Logo
BoneCP.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.jolbox.bonecp.BoneCP
constructor

Best Java code snippets using com.jolbox.bonecp.BoneCP.<init> (Showing top 11 results out of 315)

origin: dhanji/sitebricks

@Override
public synchronized void start() {
 try {
  pool = new BoneCP(config);
 } catch (SQLException e) {
  throw new RuntimeException(e);
 }
}
origin: org.apache.qpid/qpid-broker-plugins-jdbc-provider-bone

public BoneCPConnectionProvider(String connectionUrl, String username, String password, Map<String, String> providerAttributes) throws SQLException
{
  _connectionPool = new BoneCP(createBoneCPConfig(connectionUrl, username, password, providerAttributes));
}
origin: org.ddbstoolkit.toolkit.jdbc/ddbstoolkit-jdbc

public JDBCConnectionPool(final String jdbcString, final int numberOfConnection) throws SQLException {
  super();
  this.numberOfConnection = numberOfConnection;
  this.jdbcString = jdbcString;
  BoneCPConfig config = new BoneCPConfig();
   config.setJdbcUrl(jdbcString);
  this.connectionPool = new BoneCP(config);
  this.connectionSession = new HashMap<String, Connection>();
}
 
origin: org.batoo.jpa/batoo-jpa

/**
 * @throws SQLException
 * 
 */
private void maybeInit() throws SQLException {
  try {
    if (this.getDriverClass() != null) {
      this.loadClass(this.getDriverClass());
    }
  }
  catch (final ClassNotFoundException e) {
    throw new SQLException(PoolUtil.stringifyException(e));
  }
  BoneCPDataSource.logger.debug(this.toString());
  this.pool = new FinalWrapper<BoneCP>(new BoneCP(this));
}
origin: yangbutao/disgear

  e.printStackTrace();
connectionPool = new BoneCP(config); // setup the connection pool
origin: johnewart/gearman-java

config.setPartitionCount(1);
connectionPool = new BoneCP(config);
origin: johnewart/gearman-java

config.setPartitionCount(1);
connectionPool = new BoneCP(config);
origin: org.apache.sentry/sentry-shaded-miscellaneous

/**
 * {@inheritDoc}
 *
 * @see javax.sql.DataSource#getConnection()
 */
public Connection getConnection() throws SQLException {
  
  FinalWrapper<BoneCP> wrapper = this.pool;
  if (wrapper == null) {
      synchronized (this) {
          if (this.pool == null) {
            try{
              if (this.getDriverClass() != null){
                loadClass(this.getDriverClass());
              }
          
              logger.debug(this.toString());
              this.pool = new FinalWrapper<BoneCP>(new BoneCP(this));
          
            } catch (ClassNotFoundException e) {
              throw new SQLException(PoolUtil.stringifyException(e));
            }
          }
          wrapper = this.pool;
      } 
  }
  return wrapper.value.getConnection();
 }
 
origin: com.splout.db/splout-commons

public JDBCManager(String driver, String connectionUri, int nConnectionsPool, String userName, String password) throws SQLException, ClassNotFoundException {
  
  Class.forName(driver);
  
  BoneCPConfig config = new BoneCPConfig();
  config.setJdbcUrl(connectionUri);
  config.setMinConnectionsPerPartition(nConnectionsPool);
  config.setMaxConnectionsPerPartition(nConnectionsPool);
  config.setUsername(userName);
  config.setPassword(password);
  config.setPartitionCount(1);
  config.setDefaultAutoCommit(false);
  connectionPool = new BoneCP(config); // setup the connection pool
}

origin: com.github.javaclub/jorm

this.bonecp = new BoneCP(config);
if(LOG.isInfoEnabled()) {
  LOG.info("Fetching a test connnection.");
origin: datasalt/splout-db

public JDBCManager(String driver, String connectionUri, int nConnectionsPool, String userName, String password) throws SQLException,
  ClassNotFoundException {
 Class.forName(driver);
 BoneCPConfig config = new BoneCPConfig();
 config.setJdbcUrl(connectionUri);
 config.setMinConnectionsPerPartition(nConnectionsPool);
 config.setMaxConnectionsPerPartition(nConnectionsPool);
 config.setUsername(userName);
 config.setPassword(password);
 config.setPartitionCount(1);
 config.setDefaultAutoCommit(false);
 connectionPool = new BoneCP(config); // setup the connection pool
}
com.jolbox.bonecpBoneCP<init>

Javadoc

Constructor.

Popular methods of BoneCP

  • getConnection
  • shutdown
    Closes off this connection pool.
  • getConfig
    Gets config object.
  • getTotalCreatedConnections
    Return total number of connections created in all partitions.
  • getTotalLeased
    Return total number of connections currently in use by an application
  • captureStackTrace
    Throw an exception to capture it so as to be able to print it out later on
  • closeStatement
  • getDbIsDown
    Returns the dbIsDown field.
  • getStatistics
    Returns a reference to the statistics class.
  • getTotalFree
    Return the number of free connections available to an application right away (excluding connections
  • internalReleaseConnection
    Release a connection by placing the connection back in the pool.
  • isConnectionHandleAlive
    Sends a dummy statement to the server to keep the connection alive
  • internalReleaseConnection,
  • isConnectionHandleAlive,
  • maybeSignalForMoreConnections,
  • obtainRawInternalConnection,
  • postDestroyConnection,
  • putConnectionBackInPartition,
  • registerUnregisterJMX,
  • unregisterDriver,
  • destroyConnection

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • JOptionPane (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now