org.apache.avalon.excalibur.datasource
Class JdbcConnectionFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.datasource.JdbcConnectionFactory
All Implemented Interfaces:
LogEnabled, ObjectFactory

public class JdbcConnectionFactory
extends AbstractLogEnabled
implements ObjectFactory

The Factory implementation for JdbcConnections.

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:14 $
Author:
Avalon Development Team

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)
          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, java.lang.String keepAlive, int keepAliveAge, java.lang.String connectionClass)
          Creates and configures a new JdbcConnectionFactory.
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)
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,
                             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.

JdbcConnectionFactory

public JdbcConnectionFactory(java.lang.String url,
                             java.lang.String username,
                             java.lang.String password,
                             boolean autoCommit,
                             java.lang.String keepAlive,
                             int keepAliveAge,
                             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.
keepAliveAge - the maximum age in milliseconds since a connection was last used before it must be pinged using the keepAlive query. Ignored if keepAlive is null.
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
Throws:
java.lang.Exception

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
Throws:
java.lang.Exception


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.