org.outerj.xreporter.connectionprovider.nonpooling
Class NonPoolingConnectionProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.outerj.xreporter.connectionprovider.nonpooling.NonPoolingConnectionProvider
- All Implemented Interfaces:
- ConnectionProvider, org.apache.avalon.framework.logger.LogEnabled
- public class NonPoolingConnectionProvider
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements ConnectionProvider
ConnectionProvider
that always returns new JDBC connections.
Field Summary |
protected java.util.Properties |
properties
|
protected java.lang.String |
url
|
Method Summary |
void |
dispose()
This method should be called when this ConnectionProvider is no longer needed. |
java.sql.Connection |
getConnection()
Returns a Connection. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
url
protected java.lang.String url
properties
protected java.util.Properties properties
NonPoolingConnectionProvider
public NonPoolingConnectionProvider(java.util.Properties properties)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Description copied from interface:
ConnectionProvider
- 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.
- Specified by:
getConnection
in interface ConnectionProvider
- Throws:
java.sql.SQLException
dispose
public void dispose()
- Description copied from interface:
ConnectionProvider
- This method should be called when this ConnectionProvider is no longer needed.
It allows ConnectionProviders that pool connections to clean them up.
- Specified by:
dispose
in interface ConnectionProvider