net.spy.db
Class JDBCConnectionSource
java.lang.Object
net.spy.SpyObject
net.spy.db.JDBCConnectionSource
- All Implemented Interfaces:
- ConnectionSource
public class JDBCConnectionSource
- extends SpyObject
- implements ConnectionSource
Implementation of ConnectionSource that gets connections directly from
JDBC.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCConnectionSource
public JDBCConnectionSource()
getConnection
public Connection getConnection(SpyConfig conf)
throws SQLException
- Get a new connection from JDBC.
The configuration is expected to have the following values:
- dbDriverName - The database driver name
- dbSource - The JDBC URL
- dbUser - The database username
- dbPass - The database password
- Specified by:
getConnection in interface ConnectionSource
- Parameters:
conf - a SpyConfig describing the connection that needs to be
fetched.
- Throws:
SQLException - if a connection could not be obtained
returnConnection
public void returnConnection(Connection conn)
- Description copied from interface:
ConnectionSource
- Return a connection. This method is used to inform whatever pooling
mechanism is in use that the connection is no longer wanted, or
needed, or even cared about here.
- Specified by:
returnConnection in interface ConnectionSource
- See Also:
ConnectionSource
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.