org.apache.xalan.lib.sql
Class XConnectionPoolManager
java.lang.Object
|
+--org.apache.xalan.lib.sql.XConnectionPoolManager
- public class XConnectionPoolManager
- extends java.lang.Object
The ConnectionPoolManager provides a static container that allows
external programs, inside the same JVM, to supply a set of JDBC
connections to the Xalan transformer.
This provides two primary features.
External Connections; The Stylesheet no longer has to have knowladge
of the database login information. The External program can create the
connections that are already connected to the database. The Stylesheet
only needs to know the name of the connection group.
ConnectionPooling; as a performance enhancement the use of database
connections to be pooled and resused. Most of the time in using a
connection is makeing the actual connection to the database, i.e. loging
on. With connection pools, this step is only done once and reused.
Method Summary |
ConnectionPool |
getPool(java.lang.String name)
Return the connection pool referenced by the name |
void |
init()
Initialize the internal structures of the Pool Manager |
void |
registerPool(java.lang.String name,
ConnectionPool pool)
Register a nuew connection pool to the global pool table. |
void |
removePool(java.lang.String name)
Remove a pool from the global table. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XConnectionPoolManager
public XConnectionPoolManager()
init
public void init()
- Initialize the internal structures of the Pool Manager
registerPool
public void registerPool(java.lang.String name,
ConnectionPool pool)
- Register a nuew connection pool to the global pool table.
If a pool by that name currently exists, then throw an
IllegalArgumentException stating that the pool already
exist.
- Parameters:
String
- name
, the name of the pool to
add to the list.ConnectionPool
- the Connection Pool to
be added, this pool must already be set up to accept connections.
see ConnectionPool
- Throws:
IllegalArgumentException
, - throw this exception
if a pool with the same name currently exists.
removePool
public void removePool(java.lang.String name)
- Remove a pool from the global table. If the pool still has
active connections, then only mark this pool as inactive and
leave it around until all the existing connections are closed.
- Parameters:
String
- name
name of the pool to remove.
getPool
public ConnectionPool getPool(java.lang.String name)
- Return the connection pool referenced by the name
- Parameters:
String
- name
, name of the pool to be returned.
Copyright © 2000 Apache XML Project. All Rights Reserved.