|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.db.AbstractConnectionHandler
org.mentawai.db.DataSourceConnectionHandler
public class DataSourceConnectionHandler
A connection handler backed up by a javax.sql.DataSource. Use this class if you have a DataSource in hand and want to create a ConnectionHandler.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.mentawai.db.ConnectionHandler |
|---|
ConnectionHandler.Exec |
| Constructor Summary | |
|---|---|
DataSourceConnectionHandler(DataSource ds)
Creates a ConnectionHandler backed up by the given DataSource. |
|
| Method Summary | ||
|---|---|---|
void |
destroy()
Destroy the connection pool, closing and cleaning all connections. |
|
Object |
getBean()
|
|
Connection |
getConnection()
Returns a Connection to the database. |
|
|
getInstance()
|
|
String |
getStatus()
Print the status of this connection pool if any. |
|
Class<? extends Object> |
getType()
|
|
void |
onCleared(Connection conn)
|
|
void |
onCreated(Connection conn)
|
|
void |
release(Connection conn)
Release this connection. |
|
| Methods inherited from class org.mentawai.db.AbstractConnectionHandler |
|---|
exec |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceConnectionHandler(DataSource ds)
ds - The DataSource to use.| Method Detail |
|---|
public Connection getConnection()
throws SQLException
ConnectionHandler
SQLException - if there were problems trying to acquire the connection.public String getStatus()
ConnectionHandler
public Object getBean()
throws InstantiationException
InstantiationExceptionpublic <T> T getInstance()
public void onCleared(Connection conn)
public void onCreated(Connection conn)
public Class<? extends Object> getType()
public void release(Connection conn)
ConnectionHandler
conn - The connection to release.public void destroy()
ConnectionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||