1 6 7 package org.jfox.jdbc.xa; 8 9 import org.jfox.pool.ObjectFactory; 10 import org.jfox.pool.PoolableObject; 11 import org.jfox.pool.SimpleObjectPool; 12 13 16 17 public class XAConnectionPool extends SimpleObjectPool { 18 19 public XAConnectionPool(ObjectFactory factory) { 20 super((XAConnectionFactory) factory); 21 ((XAConnectionFactory) factory).setPool(this); 22 } 23 24 public XAConnectionPool(ObjectFactory factory, int initNum, int maxRest) { 25 super(factory, initNum, maxRest); 26 ((XAConnectionFactory) factory).setPool(this); 27 } 28 29 public XAConnectionPool(ObjectFactory factory, int initNum, int maxRest, long timeout) { 30 super(factory, initNum, maxRest, timeout); 31 } 32 33 42 PoolableObject retrieveObject(String user, String password) throws Exception { 43 return ((XAConnectionFactory) factory).makeObject(user, password); 44 } 45 46 public static void main(String [] args) { 47 48 } 49 } | Popular Tags |