com.objectwave.persist.broker
Class DefaultConnectionSource

java.lang.Object
  |
  +--com.objectwave.persist.broker.AbstractConnectionFactory
        |
        +--com.objectwave.persist.broker.DefaultConnectionSource
All Implemented Interfaces:
SqlConnectionFactory

public class DefaultConnectionSource
extends AbstractConnectionFactory
implements SqlConnectionFactory

Create new instances for the provided jgrinderConnection if a connection does not already exist.

Version:
$Id: DefaultConnectionSource.java,v 2.1 2001/06/13 23:40:07 dave_hoag Exp $
Author:
dhoag

Constructor Summary
DefaultConnectionSource()
          Constructor for the DefaultConnectionSource object
 
Method Summary
 java.sql.Connection checkConnection(RDBConnection jgrinderConnection)
          Create or retrieve the connection to use for accessing the database.
 java.sql.Connection connect(RDBConnection jgrinderConnection)
           
 void freeConnection(RDBConnection jgrinderConnection, java.sql.Connection connection)
          Release the connection back into the wild.
 
Methods inherited from class com.objectwave.persist.broker.AbstractConnectionFactory
checkForWarning, freeNormalConnection, logConnectionStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConnectionSource

public DefaultConnectionSource()
Constructor for the DefaultConnectionSource object

Method Detail

connect

public java.sql.Connection connect(RDBConnection jgrinderConnection)
                            throws java.sql.SQLException
Parameters:
jgrinderConnection -
Returns:
Throws:
java.sql.SQLException

checkConnection

public java.sql.Connection checkConnection(RDBConnection jgrinderConnection)
                                    throws java.sql.SQLException
Description copied from interface: SqlConnectionFactory
Create or retrieve the connection to use for accessing the database.

Specified by:
checkConnection in interface SqlConnectionFactory
Parameters:
jgrinderConnection -
Returns:
Throws:
java.sql.SQLException

freeConnection

public void freeConnection(RDBConnection jgrinderConnection,
                           java.sql.Connection connection)
Description copied from interface: SqlConnectionFactory
Release the connection back into the wild.

Specified by:
freeConnection in interface SqlConnectionFactory
Parameters:
jgrinderConnection -
connection -