com.jfw.database
Class PCMProxy

java.lang.Object
  extended by com.jfw.database.PCMProxy

public final class PCMProxy
extends java.lang.Object

Distribute connections for proprietary connection management.


Constructor Summary
PCMProxy()
           
 
Method Summary
static java.sql.Connection get(java.lang.String pcmName)
          Get a connection.
static void release(java.sql.Connection connection)
          Release a connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCMProxy

public PCMProxy()
Method Detail

get

public static java.sql.Connection get(java.lang.String pcmName)
                               throws java.lang.Exception
Get a connection.
Add connection in local container and associate the PCMConnection object with it.

Returns:
a java.sql.Connection object.
Throws:
java.lang.Exception

release

public static void release(java.sql.Connection connection)
                    throws java.lang.Exception
Release a connection.
Call method PCMConnection.releaseConnection(java.sql.Connection) and remove the connection from local container.

Parameters:
connection - the java.sql.Connection object returned by get(java.lang.String).
Throws:
java.lang.Exception