PooliT v2.0

org.ascentphase.poolit.handlers
Class JDBCHandler

java.lang.Object
  extended byorg.ascentphase.poolit.handlers.JDBCHandler
All Implemented Interfaces:
PoolHandler
Direct Known Subclasses:
PooliTConnectionHandler

public class JDBCHandler
extends java.lang.Object
implements PoolHandler

This Handler takes care of creating/destroying/verifying JDBC Connections.

Author:
Huy Duong

Field Summary
protected  java.lang.String pwd
           
protected  java.lang.String url
           
protected  java.lang.String user
           
 
Constructor Summary
JDBCHandler(java.lang.String driver, java.lang.String dburl, java.lang.String user, java.lang.String pwd)
          Creates a PoolHandler for JDBC connections
 
Method Summary
 java.lang.Object create()
          Called by a Pooler to create a new object.
 void destroy(java.lang.Object conn)
          Called by a Pooler to perform any cleanup and destroy the object for garbage collection.
 boolean verify(java.lang.Object conn)
          Called by a Pooler to verify that the object is in a consistent and useable state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.lang.String url

user

protected java.lang.String user

pwd

protected java.lang.String pwd
Constructor Detail

JDBCHandler

public JDBCHandler(java.lang.String driver,
                   java.lang.String dburl,
                   java.lang.String user,
                   java.lang.String pwd)
            throws java.lang.ClassNotFoundException
Creates a PoolHandler for JDBC connections

Parameters:
driver - string specifying the database Driver class
dburl - the jdbc URL to the database
user - user name to log in to database
pwd - password
Method Detail

create

public java.lang.Object create()
                        throws CreateException
Description copied from interface: PoolHandler
Called by a Pooler to create a new object.

Specified by:
create in interface PoolHandler
Throws:
CreateException

destroy

public void destroy(java.lang.Object conn)
Description copied from interface: PoolHandler
Called by a Pooler to perform any cleanup and destroy the object for garbage collection.

Specified by:
destroy in interface PoolHandler
Parameters:
conn - the object to be destroyed

verify

public boolean verify(java.lang.Object conn)
Description copied from interface: PoolHandler
Called by a Pooler to verify that the object is in a consistent and useable state.

Specified by:
verify in interface PoolHandler
Parameters:
conn - the object to be tested

PooliT v2.0

Copyright © 2005 Ascent Phase Corp.