org.quartz.utils
Class DBConnectionManager
java.lang.Object
org.quartz.utils.DBConnectionManager
public class DBConnectionManager - extends Object
Manages a collection of ConnectionProviders, and provides transparent access
to their connections.
- Author:
- James House, Sharada Jambula, Mohammad Rezaei
- See Also:
ConnectionProvider,
PoolingConnectionProvider,
JNDIConnectionProvider,
WeblogicConnectionProvider
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DB_PROPS_PREFIX
public static final String DB_PROPS_PREFIX
- See Also:
- Constant Field Values
addConnectionProvider
public void addConnectionProvider(String dataSourceName,
ConnectionProvider provider)
getConnection
public Connection getConnection(String dsName)
throws SQLException
- Get a database connection from the DataSource with the given name.
- Returns:
- a database connection
- Throws:
SQLException - if an error occurs, or there is no DataSource with the
given name.
getInstance
public static DBConnectionManager getInstance()
- Get the class instance.
- Returns:
- an instance of this class
shutdown
public void shutdown(String dsName)
throws SQLException
- Shuts down database connections from the DataSource with the given name,
if applicable for the underlying provider.
- Throws:
SQLException - if an error occurs, or there is no DataSource with the
given name.
|