|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jolbox.bonecp.BoneCPConfig
com.jolbox.bonecp.BoneCPDataSource
public class BoneCPDataSource
DataSource for use with LazyConnection Provider etc.
| Constructor Summary | |
|---|---|
BoneCPDataSource()
Default empty constructor. |
|
BoneCPDataSource(BoneCPConfig config)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the datasource. |
BoneCPConfig |
getConfig()
Returns a configuration object built during initialization of the connection pool. |
Connection |
getConnection()
|
Connection |
getConnection(String username,
String password)
|
String |
getDriverClass()
Gets driver class set in config. |
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
PrintWriter |
getLogWriter()
Retrieves the log writer for this DataSource object. |
Object |
getObjectInstance(Object object,
Name name,
Context context,
Hashtable<?,?> table)
|
int |
getTotalLeased()
Returns the total leased connections. |
boolean |
isWrapperFor(Class<?> arg0)
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
void |
setDriverClass(String driverClass)
Sets driver to use (called via reflection). |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(PrintWriter out)
Sets the log writer for this DataSource object to the given java.io.PrintWriter object. |
Object |
unwrap(Class arg0)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BoneCPDataSource()
public BoneCPDataSource(BoneCPConfig config)
config - | Method Detail |
|---|
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection()public void close()
public Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection(java.lang.String, java.lang.String)
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public boolean isWrapperFor(Class<?> arg0)
throws SQLException
isWrapperFor in interface Wrapperarg0 - class
SQLException - on error
public Object unwrap(Class arg0)
throws SQLException
unwrap in interface Wrapperarg0 - obj
SQLExceptionpublic String getDriverClass()
public void setDriverClass(String driverClass)
driverClass - Driver to usepublic int getTotalLeased()
public BoneCPConfig getConfig()
public Object getObjectInstance(Object object,
Name name,
Context context,
Hashtable<?,?> table)
throws Exception
getObjectInstance in interface ObjectFactoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||