1 28 29 package com.caucho.sql.spy; 30 31 import com.caucho.log.Log; 32 import com.caucho.util.L10N; 33 34 import javax.sql.XAConnection ; 35 import javax.transaction.xa.XAResource ; 36 import java.sql.SQLException ; 37 import java.util.logging.Logger ; 38 39 42 public class SpyXAConnection extends SpyPooledConnection 43 implements javax.sql.XAConnection { 44 protected final static Logger log = Log.open(SpyXAConnection.class); 45 protected final static L10N L = new L10N(SpyXAConnection.class); 46 47 private XAConnection _conn; 49 50 53 public SpyXAConnection(XAConnection conn, int id) 54 { 55 super(conn, id); 56 57 _conn = conn; 58 } 59 60 63 public XAResource getXAResource() 64 throws SQLException 65 { 66 return new SpyXAResource(_id, _conn.getXAResource()); 67 } 68 69 public String toString() 70 { 71 return "SpyXAConnection[id=" + _id + ",conn=" + _conn + "]"; 72 } 73 } 74 | Popular Tags |