public abstract class JDBCConnectionPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected com.jolbox.bonecp.BoneCP |
connectionPool
Connection pool
|
protected java.util.Map<java.lang.String,java.sql.Connection> |
connectionSession
Connection session
|
protected java.lang.String |
jdbcString
JDBC String
|
protected int |
numberOfConnection
Number of connection
|
Constructor and Description |
---|
JDBCConnectionPool(java.lang.String jdbcString,
int numberOfConnection) |
Modifier and Type | Method and Description |
---|---|
DDBSTransaction |
createSession()
Create a new connection session
|
void |
endSession(DDBSTransaction transaction)
End JDBC session
|
java.sql.Connection |
getConnection()
Get JDBC connection
|
java.sql.Connection |
getConnection(DDBSTransaction transaction)
Get JDBC connection
|
abstract JDBCConnector |
getJDBCConnector(java.sql.Connection connection)
Get JDBC Connector
|
void |
shutdownConnectionPool()
Shutdown connection pool
|
java.lang.String |
toString() |
protected com.jolbox.bonecp.BoneCP connectionPool
protected int numberOfConnection
protected java.util.Map<java.lang.String,java.sql.Connection> connectionSession
protected java.lang.String jdbcString
public JDBCConnectionPool(java.lang.String jdbcString, int numberOfConnection) throws java.sql.SQLException
java.sql.SQLException
public DDBSTransaction createSession() throws java.sql.SQLException
java.sql.SQLException
- SQL Exceptionpublic java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
- SQL Exceptionpublic java.sql.Connection getConnection(DDBSTransaction transaction)
transaction
- Transactionpublic void endSession(DDBSTransaction transaction) throws java.sql.SQLException
transaction
- Transactionjava.sql.SQLException
- SQL Exceptionpublic void shutdownConnectionPool()
public abstract JDBCConnector getJDBCConnector(java.sql.Connection connection) throws java.sql.SQLException
connection
- JDBC connectionjava.sql.SQLException
- SQL Exceptionpublic java.lang.String toString()
toString
in class java.lang.Object