|
||||||||||
| 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. |
boolean |
equals(java.lang.Object obj)
|
BoneCPConfig |
getConfig()
Returns a configuration object built during initialization of the connection pool. |
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
|
java.lang.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. |
java.io.PrintWriter |
getLogWriter()
Retrieves the log writer for this DataSource object. |
java.lang.Object |
getObjectInstance(java.lang.Object object,
javax.naming.Name name,
javax.naming.Context context,
java.util.Hashtable<?,?> table)
|
int |
getTotalLeased()
Returns the total leased connections. |
int |
hashCode()
|
boolean |
isWrapperFor(java.lang.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(java.lang.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(java.io.PrintWriter out)
Sets the log writer for this DataSource object to the given java.io.PrintWriter object. |
java.lang.Object |
unwrap(java.lang.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 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BoneCPDataSource()
public BoneCPDataSource(BoneCPConfig config)
config - | Method Detail |
|---|
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.getConnection()public void close()
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.getConnection(java.lang.String, java.lang.String)
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLException
public int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLException
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLException
public void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> arg0)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperarg0 - class
java.sql.SQLException - on error
public java.lang.Object unwrap(java.lang.Class arg0)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperarg0 - obj
java.sql.SQLExceptionpublic java.lang.String getDriverClass()
public void setDriverClass(java.lang.String driverClass)
driverClass - Driver to usepublic int getTotalLeased()
public BoneCPConfig getConfig()
public java.lang.Object getObjectInstance(java.lang.Object object,
javax.naming.Name name,
javax.naming.Context context,
java.util.Hashtable<?,?> table)
throws java.lang.Exception
getObjectInstance in interface javax.naming.spi.ObjectFactoryjava.lang.Exceptionpublic boolean equals(java.lang.Object obj)
equals in class BoneCPConfigpublic int hashCode()
hashCode in class BoneCPConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||