com.waveset.adapter
Class OracleConnectionPool

java.lang.Object
  extended bycom.waveset.adapter.OracleConnectionPool

public class OracleConnectionPool
extends java.lang.Object


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
OracleConnectionPool(Resource r)
          A pool of agent connections to a single remote agent.
 
Method Summary
 void closeConnections()
           
 java.sql.Connection getConnection()
          Return a connected connection.
 boolean matchResource(Resource r)
          If the class, port, and host match, return true.
 void reapConnections()
           
 void returnConnection(java.sql.Connection conn, boolean isBogus)
          Return a connection to the pool.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

OracleConnectionPool

public OracleConnectionPool(Resource r)
                     throws java.sql.SQLException,
                            java.lang.Exception
A pool of agent connections to a single remote agent.

Method Detail

reapConnections

public void reapConnections()

closeConnections

public void closeConnections()

shutdown

public void shutdown()
              throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Return a connected connection. Because there is a limit on the number of concurrent connections, block if the pool is full and busy. This is a synchronized method so it is safe to call from many contexts.

Throws:
java.sql.SQLException

returnConnection

public void returnConnection(java.sql.Connection conn,
                             boolean isBogus)
                      throws java.sql.SQLException
Return a connection to the pool. If (isBogus), the connection is deleted and not returned to the pool.

Throws:
java.sql.SQLException

matchResource

public boolean matchResource(Resource r)
If the class, port, and host match, return true. This means that this pool is a valid place to get a connection to the passed in resource