Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.dbcp
Class DriverConnectionFactory  view DriverConnectionFactory download DriverConnectionFactory.java

java.lang.Object
  extended byorg.apache.commons.dbcp.DriverConnectionFactory
All Implemented Interfaces:
ConnectionFactory

public class DriverConnectionFactory
extends java.lang.Object
implements ConnectionFactory

A java.sql.Driver-based implementation of ConnectionFactory.

Version:
$Revision: 1.7 $ $Date: 2004/02/28 12:18:17 $

Field Summary
protected  java.lang.String _connectUri
           
protected  java.sql.Driver _driver
           
protected  java.util.Properties _props
           
 
Constructor Summary
DriverConnectionFactory(java.sql.Driver driver, java.lang.String connectUri, java.util.Properties props)
           
 
Method Summary
 java.sql.Connection createConnection()
          Create a new java.sql.Connection in an implementation specific fashion.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_driver

protected java.sql.Driver _driver

_connectUri

protected java.lang.String _connectUri

_props

protected java.util.Properties _props
Constructor Detail

DriverConnectionFactory

public DriverConnectionFactory(java.sql.Driver driver,
                               java.lang.String connectUri,
                               java.util.Properties props)
Method Detail

createConnection

public java.sql.Connection createConnection()
                                     throws java.sql.SQLException
Description copied from interface: ConnectionFactory
Create a new java.sql.Connection in an implementation specific fashion.

Specified by:
createConnection in interface ConnectionFactory

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).