org.apache.avalon.excalibur.datasource
Class JdbcConnectionFactory

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.excalibur.datasource.JdbcConnectionFactory
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, ObjectFactory

public class JdbcConnectionFactory
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements ObjectFactory

The Factory implementation for JdbcConnections.

Since:
4.0
Version:
CVS $Revision: 1.10 $ $Date: 2002/01/26 16:58:06 $
Author:
Berin Loritsch

Constructor Summary
JdbcConnectionFactory(java.lang.String url, java.lang.String username, java.lang.String password, boolean autoCommit, boolean oradb)
          Deprecated. Use the new constructor with the keepalive and connectionClass specified.
JdbcConnectionFactory(java.lang.String url, java.lang.String username, java.lang.String password, boolean autoCommit, boolean oradb, java.lang.String connectionClass)
           
JdbcConnectionFactory(java.lang.String url, java.lang.String username, java.lang.String password, boolean autoCommit, java.lang.String keepAlive, java.lang.String connectionClass)
          Creates and configures a new JdbcConnectionFactory.
 
Method Summary
 void decommission(java.lang.Object object)
           
 java.lang.Class getCreatedClass()
           
 java.lang.Object newInstance()
           
 
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
 

Constructor Detail

JdbcConnectionFactory

public JdbcConnectionFactory(java.lang.String url,
                             java.lang.String username,
                             java.lang.String password,
                             boolean autoCommit,
                             boolean oradb)
Deprecated. Use the new constructor with the keepalive and connectionClass specified.


JdbcConnectionFactory

public JdbcConnectionFactory(java.lang.String url,
                             java.lang.String username,
                             java.lang.String password,
                             boolean autoCommit,
                             boolean oradb,
                             java.lang.String connectionClass)

JdbcConnectionFactory

public JdbcConnectionFactory(java.lang.String url,
                             java.lang.String username,
                             java.lang.String password,
                             boolean autoCommit,
                             java.lang.String keepAlive,
                             java.lang.String connectionClass)
Creates and configures a new JdbcConnectionFactory.
Parameters:
url - full JDBC database url.
username - username to use when connecting to the database.
password - password to use when connecting to the database.
autoCommit - true if connections to the database should operate with auto commit enabled.
keepAlive - a query which will be used to check the statis of a connection after it has been idle. A null value will cause the keep alive feature to be disabled.
connectionClass - class of connections created by the factory.
Method Detail

newInstance

public java.lang.Object newInstance()
                             throws java.lang.Exception
Specified by:
newInstance in interface ObjectFactory

getCreatedClass

public java.lang.Class getCreatedClass()
Specified by:
getCreatedClass in interface ObjectFactory

decommission

public void decommission(java.lang.Object object)
                  throws java.lang.Exception
Specified by:
decommission in interface ObjectFactory


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.