1 package example; 2 3 import java.io.*; 4 import java.util.*; 5 6 import javax.resource.ResourceException ; 7 8 import javax.resource.spi.ConnectionManager ; 9 10 import javax.security.auth.*; 11 12 18 public class ConnectionFactoryImpl { 19 private ConnectionManager _connManager; 22 23 private ManagedConnectionFactoryImpl _mcFactory; 25 26 private volatile boolean _isClosed; 27 28 35 ConnectionFactoryImpl(ManagedConnectionFactoryImpl mcFactory, 36 ConnectionManager connManager) 37 { 38 _mcFactory = mcFactory; 39 _connManager = connManager; 40 } 41 42 50 public ConnectionImpl getConnection() 51 throws ResourceException 52 { 53 return (ConnectionImpl) _connManager.allocateConnection(_mcFactory, null); 57 } 58 59 public String toString() 60 { 61 return "ConnectionFactoryImpl[" + _mcFactory + "]"; 62 } 63 } 64 | Popular Tags |