net.mlw.vlh.adapter.jdbc.util
Class StandardConnectionCreator

java.lang.Object
  extended bynet.mlw.vlh.adapter.jdbc.util.StandardConnectionCreator
All Implemented Interfaces:
ConnectionCreator
Direct Known Subclasses:
SpringConnectionCreator

public class StandardConnectionCreator
extends Object
implements ConnectionCreator

The default connection creator, it uses the simplest way to create connection and clear the resources.

Version:
$Revision: 1.3 $ $Date: 2006/03/29 19:47:49 $
Author:
Stepan Marek

Constructor Summary
StandardConnectionCreator()
           
StandardConnectionCreator(DataSource dataSource)
           
 
Method Summary
 void close(ResultSet result, PreparedStatement statement, Connection connection)
          Close all opened resources.
 Connection createConnection()
          Creates a new connection.
 DataSource getDataSource()
           
 void setDataSource(DataSource dataSource)
           
 void setTransactionIsolation(int transactionIsolation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardConnectionCreator

public StandardConnectionCreator()

StandardConnectionCreator

public StandardConnectionCreator(DataSource dataSource)
Method Detail

createConnection

public Connection createConnection()
                            throws SQLException
Description copied from interface: ConnectionCreator
Creates a new connection.

Specified by:
createConnection in interface ConnectionCreator
Returns:
Throws:
SQLException

close

public void close(ResultSet result,
                  PreparedStatement statement,
                  Connection connection)
Description copied from interface: ConnectionCreator
Close all opened resources.

Specified by:
close in interface ConnectionCreator
Parameters:
result -
statement -
connection -

getDataSource

public DataSource getDataSource()
Specified by:
getDataSource in interface ConnectionCreator
Returns:
Returns the dataSource.

setDataSource

public void setDataSource(DataSource dataSource)
Specified by:
setDataSource in interface ConnectionCreator
Parameters:
dataSource - The dataSource to set.

setTransactionIsolation

public void setTransactionIsolation(int transactionIsolation)


Copyright © 2003-2006 mlavilson. All Rights Reserved.