本文整理了Java中com.jolbox.bonecp.BoneCP.<init>()
方法的一些代码示例,展示了BoneCP.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BoneCP.<init>()
方法的具体详情如下:
包路径:com.jolbox.bonecp.BoneCP
类名称:BoneCP
方法名:<init>
[英]Constructor.
[中]构造器。
代码示例来源: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
}
内容来源于网络,如有侵权,请联系作者删除!