com.bankframe.examples.txnhandler.connector.testcustomer
Class TestCustomerConnectionPool

java.lang.Object
  extended bycom.bankframe.examples.txnhandler.connector.testcustomer.TestCustomerConnectionPool
All Implemented Interfaces:
java.io.Serializable

public class TestCustomerConnectionPool
extends java.lang.Object
implements java.io.Serializable

This class maintains a pool of TestCustomerConnection instances

See Also:
Serialized Form

Constructor Summary
TestCustomerConnectionPool(java.lang.String name, int maxConns, int timeOut)
          Default constructor
 
Method Summary
 void addConnection(EManagedConnection conn)
          This method adds a connection to the free pool
 void freeConnection(EManagedConnection conn)
          This method frees a connection
 EManagedConnection getConnection(EManagedConnectionFactory mcf, java.lang.String properties)
          This method gets a connection from the pool
 java.util.Set getFreeConnections()
          This method gets all the free connections
 java.lang.String getName()
          This method gets the name of the connection pool
 void release()
          This method frees all connections
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCustomerConnectionPool

public TestCustomerConnectionPool(java.lang.String name,
                                  int maxConns,
                                  int timeOut)
Default constructor

Parameters:
name - Name of the pool
maxConns - The maximum size of the pool
timeOut - The maximum length of time to wait for a connection to become free
Method Detail

addConnection

public void addConnection(EManagedConnection conn)
This method adds a connection to the free pool

Parameters:
conn - The connection

freeConnection

public void freeConnection(EManagedConnection conn)
This method frees a connection


getConnection

public EManagedConnection getConnection(EManagedConnectionFactory mcf,
                                        java.lang.String properties)
                                 throws java.sql.SQLException
This method gets a connection from the pool

Parameters:
mcf - The connection factory
properties - The configuration properties for the connection
Throws:
java.sql.SQLException

getFreeConnections

public java.util.Set getFreeConnections()
This method gets all the free connections


getName

public java.lang.String getName()
This method gets the name of the connection pool


release

public void release()
This method frees all connections



Copyright © 2004 Siebel Systems, Inc. All rights reserved.