org.mmbase.module.database
Class MultiPool

java.lang.Object
  extended byorg.mmbase.module.database.MultiPool

public class MultiPool
extends Object

JDBC Pool, a dummy interface to multiple real connection

Version:
$Id: MultiPool.java,v 1.57 2005/12/17 16:18:58 michiel Exp $
Author:
vpro
Warning: No Java Documentation Available.

Method Summary
protected  void createPool()
          Creates and fills the connection pool
protected  boolean fillPool(boolean logStack)
          Fills the connection pool.
protected  void finalize()
           
 Iterator getBusyPool()
          For reporting purposes the connections in busypool can be listed.
protected  MultiConnection getMultiConnection()
          Request a new 'real' Connection and wraps it in a new 'MultiConnection' object.
 Iterator getPool()
          For reporting purposes the connections in pool can be listed.
 int getSize()
          get the pool size
 int getTotalConnectionsCreated()
          get the number of statements performed
protected  void replaceConnection(MultiConnection multiCon)
          Tries to fix this multi-connection if it is broken (e.g.
 void shutdown()
          'realcloses' all connections.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createPool

protected void createPool()
Creates and fills the connection pool

Since:
MMBase-1.7

fillPool

protected boolean fillPool(boolean logStack)
Fills the connection pool.

Returns:
true if the pool contains connections and mmbase can be started.
Since:
MMBase-1.7

getMultiConnection

protected MultiConnection getMultiConnection()
                                      throws SQLException
Request a new 'real' Connection and wraps it in a new 'MultiConnection' object.

Throws:
SQLException
Since:
MMBase-1.7

replaceConnection

protected void replaceConnection(MultiConnection multiCon)
                          throws SQLException
Tries to fix this multi-connection if it is broken (e.g. if database restarted).

Throws:
SQLException
Since:
MMBase-1.7.1

finalize

protected void finalize()

shutdown

public void shutdown()
'realcloses' all connections.

Since:
MMBase-1.6.2

getSize

public int getSize()
get the pool size


getTotalConnectionsCreated

public int getTotalConnectionsCreated()
get the number of statements performed


getPool

public Iterator getPool()
For reporting purposes the connections in pool can be listed. An Iterator on a copy of the Pool is returned.

See Also:
JDBC.listConnections(org.mmbase.util.StringTagger)

getBusyPool

public Iterator getBusyPool()
For reporting purposes the connections in busypool can be listed. An Iterator on a copy of the BusyPool is returned.

See Also:
JDBC.listConnections(org.mmbase.util.StringTagger)

toString

public String toString()
Warning: No Java Documentation Available.


MMBase build 1.8.1.20060716