public class DataSourceConnectionHandler extends AbstractConnectionHandler
ConnectionHandler.Exec| Constructor and Description |
|---|
DataSourceConnectionHandler(DataSource ds)
Creates a ConnectionHandler backed up by the given DataSource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the connection pool, closing and cleaning all connections.
|
Object |
getBean() |
Connection |
getConnection()
Returns a Connection to the database.
|
String |
getStatus()
Print the status of this connection pool if any.
|
void |
release(Connection conn)
Release this connection.
|
exec, getInstance, getType, onCleared, onCreatedpublic DataSourceConnectionHandler(DataSource ds)
ds - The DataSource to use.public Connection getConnection() throws SQLException
ConnectionHandlerSQLException - if there were problems trying to acquire the connection.public String getStatus()
ConnectionHandlerpublic Object getBean() throws InstantiationException
InstantiationExceptionpublic void release(Connection conn)
ConnectionHandlerconn - The connection to release.public void destroy()
ConnectionHandlerCopyright © 2015. All Rights Reserved.