org.geotools.data.db2
Class DB2ConnectionFactory

Object
  extended by DB2ConnectionFactory

Deprecated. Use DataSource, DataSourceUtil and DataSourceFinder instead

public class DB2ConnectionFactory
extends Object

A factory to create a DB2 Connection based on the needed parameters.

Author:
David Adler - IBM Corporation
Module:
modules/plugin/db2 (gt-db2.jar)

Constructor Summary
DB2ConnectionFactory(String host, String portnum, String dbname)
          Deprecated. Creates a new DB2ConnectionFactory from a host name, port number, and database name.
 
Method Summary
 ConnectionPool getConnectionPool()
          Deprecated. Returns a ConnectionPool.
 String getDbURL()
          Deprecated. Returns the database URL string for this connection.
 void setLogin(String user, String pw)
          Deprecated. Sets database login information.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2ConnectionFactory

public DB2ConnectionFactory(String host,
                            String portnum,
                            String dbname)
Deprecated. 
Creates a new DB2ConnectionFactory from a host name, port number, and database name. If the port number is zero we will try to use the JDBC type 2 driver and if the port number is non-zer, we will try to use the JDBC type 4 driver

Parameters:
host - the DB2 host name
portnum - the TCP/IP port number for the DB2 client connection
dbname - the DB2 database name
Method Detail

setLogin

public void setLogin(String user,
                     String pw)
Deprecated. 
Sets database login information.

Parameters:
user - the database user name
pw - the user's database password

getDbURL

public String getDbURL()
Deprecated. 
Returns the database URL string for this connection.

Returns:
dbURL

getConnectionPool

public ConnectionPool getConnectionPool()
                                 throws SQLException
Deprecated. 
Returns a ConnectionPool. Assumes that the required connection information: database name, user name and password have already been set.

Returns:
a ConnectionPool object
Throws:
SQLException - if we fail to get a database connection


Copyright © 1996-2010 Geotools. All Rights Reserved.