com.caucho.env.dbpool
Class ThreadConnectionManager

java.lang.Object
  extended by com.caucho.env.dbpool.ThreadConnectionManager

public class ThreadConnectionManager
extends java.lang.Object

Manages the connections for a thread. Needed to support the "cached" connection, i.e. elisting only when work is actually done.


Constructor Summary
ThreadConnectionManager()
           
 
Method Summary
static void addConnection(com.caucho.env.dbpool.ManagedPoolItem conn)
          Adds a pooled connection to the current thread.
static ThreadConnectionManager createThreadManager()
          Returns the manager for the current thread, creating if necessary.
static ThreadConnectionManager getThreadManager()
          Returns the manager for the current thread.
static void removeConnection(com.caucho.env.dbpool.ManagedPoolItem conn)
          Removes a pooled connection from the current thread.
static void setThreadManager(ThreadConnectionManager manager)
          Sets the manager for the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadConnectionManager

public ThreadConnectionManager()
Method Detail

getThreadManager

public static ThreadConnectionManager getThreadManager()
Returns the manager for the current thread.


setThreadManager

public static void setThreadManager(ThreadConnectionManager manager)
Sets the manager for the current thread.


createThreadManager

public static ThreadConnectionManager createThreadManager()
Returns the manager for the current thread, creating if necessary.


addConnection

public static void addConnection(com.caucho.env.dbpool.ManagedPoolItem conn)
Adds a pooled connection to the current thread.


removeConnection

public static void removeConnection(com.caucho.env.dbpool.ManagedPoolItem conn)
Removes a pooled connection from the current thread.