safejdbc
Interface ConnectionProvider
- All Known Implementing Classes:
- DataSourceAdapter, SimpleConnectionProvider, LoggingWrapper, SimpleConProvider
- public interface ConnectionProvider
A ConnectionProvider is used by the SQLExecuter class to obtain a
connection. The reason why an interface is used is that there are different
ways a connection can be obtained - There is the standard JDBC 1 way via
Driver classes or the DriverManager, then there is the JDBC 2 way via
DataSources, and then some JDBC drivers come with their own implementations
of connection pooling which can be used even outside an application server.
The SimpleJdbc framework can be used with any mechanism for creating and
managing database connections because it creates connections only through this
interface. SimpleConnectionProvider
and DataSourceAdapter contain default
implementations for the most widely used ways to create database connections,
but if none of these fit, you can just build your own.
Method Summary |
java.sql.Connection |
getConnection()
This method is called to actually give the connection |
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- This method is called to actually give the connection
Copyright (c) 2001, 2002 by Jan Hermanns and Arno Haase. All Rights Reserved.