public class JNDIConnectionHandler extends AbstractConnectionHandler
ConnectionHandler.Exec| 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.
|
static ConnectionHandler |
getInstance(String poolname)
Gets a ConnectionHandler with a DataSource bound to the JNDI context with the given name.
|
String |
getStatus()
Print the status of this connection pool if any.
|
void |
release(Connection conn)
Release this connection.
|
exec, getInstance, getType, onCleared, onCreatedpublic 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 static ConnectionHandler getInstance(String poolname)
poolname - The name with which the DataSource is bound to the JNDI context.public void destroy()
ConnectionHandlerCopyright © 2015. All Rights Reserved.