pl.kernelpanic.dbmonster.connection
Interface ConnectionProvider

All Known Implementing Classes:
DBCPConnectionProvider, SimpleConnectionProvider

public interface ConnectionProvider

This interface provides an unified access to the JDBC connections.

Version:
$Id: ConnectionProvider.java,v 1.1 2004/05/22 13:14:16 majek Exp $
Author:
Piotr Maj <pm@jcake.com>

Method Summary
 Connection getConnection()
          Returns a JDBC connection.
 void setAutoCommit(boolean autoCommit)
          Sets the autocommit flag for created connection.
 void shutdown()
          Shuts down the connection provider releasing all resources.
 void testConnection()
          Tests a connection.
 

Method Detail

getConnection

Connection getConnection()
                         throws SQLException
Returns a JDBC connection.

Returns:
JDBC connection
Throws:
SQLException - if connection cannot be obtained.

testConnection

void testConnection()
                    throws SQLException
Tests a connection.

Throws:
SQLException - if connection could not be tested.

shutdown

void shutdown()
Shuts down the connection provider releasing all resources.


setAutoCommit

void setAutoCommit(boolean autoCommit)
Sets the autocommit flag for created connection.

Parameters:
autoCommit -


Copyright © 2003-2006 .:. kernelpanic.pl .:.. All Rights Reserved.