org.outerj.xreporter.connectionprovider
Interface ConnectionProvider

All Known Implementing Classes:
NonPoolingConnectionProvider, PoolingConnectionProvider

public interface ConnectionProvider

Provides JDBC Connections. Implementations could pool the connections, but are not required to do so.


Method Summary
 void dispose()
          This method should be called when this ConnectionProvider is no longer needed.
 java.sql.Connection getConnection()
          Returns a Connection.
 

Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Returns a Connection. Do not forget to close this connection when you're done with it! This usually means that you should use a try-finally block.

Throws:
java.sql.SQLException

dispose

public void dispose()
This method should be called when this ConnectionProvider is no longer needed. It allows ConnectionProviders that pool connections to clean them up.