1 package org.apache.ojb.otm.connector; 2 3 17 18 import javax.resource.ResourceException ; 19 import javax.resource.spi.ConnectionManager ; 20 import javax.resource.spi.ConnectionRequestInfo ; 21 import javax.resource.spi.ManagedConnection ; 22 import javax.resource.spi.ManagedConnectionFactory ; 23 import java.io.Serializable ; 24 25 29 public class OTMConnectionManager 30 implements ConnectionManager , Serializable 31 { 32 33 public OTMConnectionManager() 34 { 35 Util.log("In OTMConnectionManager"); 36 } 37 38 public Object allocateConnection(ManagedConnectionFactory mcf, ConnectionRequestInfo info) 39 throws ResourceException 40 { 41 Util.log("In OTMConnectionManager.allocateConnection"); 42 ManagedConnection mc = mcf.createManagedConnection(null, info); 43 return mc.getConnection(null, info); 44 } 45 } 46 | Popular Tags |