org.objectweb.jac.aspects.distrans.persistence
Class XAPoolCache

java.lang.Object
  extended byorg.objectweb.jac.aspects.distrans.persistence.XAPoolCache

public class XAPoolCache
extends Object

This class implements a cache of connections towards multiple XADataSource. Contrary to a simple pool that manages multiple connections towards a single XADataSource, this cache manages connections for each XADataSource registered in the cache. Hence, this is a pool of pools.

Version:
1.0
Author:
Lionel Seinturier

Constructor Summary
XAPoolCache()
           
 
Method Summary
static Connection getConnection(org.enhydra.jdbc.standard.StandardXADataSource ds)
          Get a connection for a XADataSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAPoolCache

public XAPoolCache()
Method Detail

getConnection

public static Connection getConnection(org.enhydra.jdbc.standard.StandardXADataSource ds)
                                throws SQLException
Get a connection for a XADataSource. Either return the reference towards an already existing connection, or create a new one.

Parameters:
ds - the XADataSource instance
Returns:
a SQL connection
Throws:
SQLException