org.geotools.data.geometryless
Class ConnectionPoolFacade

java.lang.Object
  extended byorg.geotools.data.geometryless.ConnectionPoolFacade
All Implemented Interfaces:
javax.sql.ConnectionPoolDataSource

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

Creates ConnectionPool objects for a certain JDBC database instance.

Author:
Rob Atkinson rob@socialchange.net.NOSPAM.au, Gary Sheppard garysheppard@psu.edu

Constructor Summary
ConnectionPoolFacade(java.lang.String poolKey, java.lang.String driver)
          Creates a new ConnectionPool object from a specified database URL.
 
Method Summary
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 javax.sql.PooledConnection getPooledConnection()
           
 javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(java.io.PrintWriter out)
           
 void setPassword(java.lang.String password)
          Sets the JDBC database login credentials.
 void setURL(java.lang.String dbURL)
          Sets the JDBC database login credentials.
 void setUser(java.lang.String username)
          Sets the JDBC database login credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPoolFacade

public ConnectionPoolFacade(java.lang.String poolKey,
                            java.lang.String driver)
                     throws java.sql.SQLException
Creates a new ConnectionPool object from a specified database URL. This is normally of the following format:

jdbc:mysql:// : /

Method Detail

setUser

public void setUser(java.lang.String username)
Sets the JDBC database login credentials.

Parameters:
username - the username

setURL

public void setURL(java.lang.String dbURL)
            throws java.sql.SQLException
Sets the JDBC database login credentials.

Throws:
java.sql.SQLException

setPassword

public void setPassword(java.lang.String password)
Sets the JDBC database login credentials.

Parameters:
password - the password

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String user,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Specified by:
getLoginTimeout in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Specified by:
getLogWriter in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws java.sql.SQLException
Specified by:
setLogWriter in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws java.sql.SQLException
Specified by:
setLoginTimeout in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException


Copyright © GeoTools. All Rights Reserved.