spo.src.SPDB.Util
Class spoUtil

java.lang.Object
  |
  +--spo.src.SPDB.Util.spoUtil

public class spoUtil
extends java.lang.Object

A utility class for the spo data server


Field Summary
static AbstractDatabase dbAdapter
           
 
Constructor Summary
spoUtil()
          Initialize an instance of the utility class
 
Method Summary
 void closeConnection(java.sql.Connection conn)
          Close the specified connection
 void closeConnections()
          Close all the connection from the pool
 java.sql.Connection getConnection()
          Obtain a Connection from the connection pool
 java.util.Hashtable getConnectionPool()
          Create and return a pool of Connections
 int getPoolSize()
          Return the size of the pool
 java.sql.Connection openConnection()
          Establish a JDBC database connection using connection info from the properties file
 void returnConnection(java.sql.Connection conn)
          Return the connection back to the pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbAdapter

public static AbstractDatabase dbAdapter
Constructor Detail

spoUtil

public spoUtil()
Initialize an instance of the utility class

Method Detail

getConnectionPool

public java.util.Hashtable getConnectionPool()
                                      throws java.sql.SQLException,
                                             java.lang.ClassNotFoundException
Create and return a pool of Connections

java.sql.SQLException
java.lang.ClassNotFoundException

openConnection

public java.sql.Connection openConnection()
                                   throws java.sql.SQLException,
                                          java.lang.ClassNotFoundException
Establish a JDBC database connection using connection info from the properties file

java.sql.SQLException
java.lang.ClassNotFoundException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException,
                                         java.lang.ClassNotFoundException,
                                         java.lang.Exception
Obtain a Connection from the connection pool

java.sql.SQLException
java.lang.ClassNotFoundException
java.lang.Exception

returnConnection

public void returnConnection(java.sql.Connection conn)
Return the connection back to the pool


closeConnections

public void closeConnections()
Close all the connection from the pool


closeConnection

public void closeConnection(java.sql.Connection conn)
Close the specified connection


getPoolSize

public int getPoolSize()
Return the size of the pool



Copyright © 2003 UKCS. All Rights Reserved.