com.caucho.db.jdbc
Class ConnectionPoolDataSourceImpl

java.lang.Object
  extended by com.caucho.db.jdbc.ConnectionPoolDataSourceImpl
All Implemented Interfaces:
javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource
Direct Known Subclasses:
ConnectionFactory

public class ConnectionPoolDataSourceImpl
extends java.lang.Object
implements javax.sql.ConnectionPoolDataSource

Driver for the internal database.


Constructor Summary
ConnectionPoolDataSourceImpl()
          Creates a new data source
 
Method Summary
protected  void finalize()
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 javax.sql.PooledConnection getPooledConnection()
          Driver interface to create a new connection.
 javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password)
          Driver interface to create a new connection.
 java.lang.String getURL()
           
 void init()
          Initialize the data source.
 void setCreateDatabase(boolean create)
          If true, creates the database on init.
 void setLoginTimeout(int foo)
           
 void setLogWriter(java.io.PrintWriter log)
           
 void setPath(Path path)
          Sets the path to the database.
 void setRemoveOnError(boolean remove)
          If true, removes bad tables on init.
 void setURL(java.lang.String url)
          Sets the url to the database.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionPoolDataSourceImpl

public ConnectionPoolDataSourceImpl()
Creates a new data source

Method Detail

setPath

public void setPath(Path path)
Sets the path to the database.


setURL

public void setURL(java.lang.String url)
Sets the url to the database.


getURL

public java.lang.String getURL()

setCreateDatabase

public void setCreateDatabase(boolean create)
If true, creates the database on init.


setRemoveOnError

public void setRemoveOnError(boolean remove)
If true, removes bad tables on init.


init

public void init()
          throws java.sql.SQLException
Initialize the data source.

Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource

setLoginTimeout

public void setLoginTimeout(int foo)
Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource

getLogWriter

public java.io.PrintWriter getLogWriter()
Specified by:
getLogWriter in interface javax.sql.CommonDataSource

setLogWriter

public void setLogWriter(java.io.PrintWriter log)
Specified by:
setLogWriter in interface javax.sql.CommonDataSource

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
Driver interface to create a new connection.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
Driver interface to create a new connection.

Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable