1 package com.protomatter.jdbc.pool; 2 3 52 53 import java.sql.*; 54 import javax.sql.*; 55 import java.util.*; 56 import com.protomatter.util.*; 57 import com.protomatter.pool.*; 58 59 69 public class JdbcConnectionPoolPooledConnection 70 implements PooledConnection 71 { 72 private JdbcConnectionPoolConnection connection = null; 73 74 78 JdbcConnectionPoolPooledConnection(JdbcConnectionPoolConnection connection) 79 { 80 this.connection = connection; 81 } 82 83 86 public Connection getConnection() 87 throws SQLException 88 { 89 if (this.connection.isObjectPoolObjectValid()) 90 return (Connection)this.connection; 91 throw new SQLException(PoolResources.getResourceString(MessageConstants.CONNECTION_IS_INVALID_MESSAGE)); 92 } 93 94 97 public void close() 98 throws SQLException 99 { 100 if (this.connection.isObjectPoolObjectValid()) 101 this.connection.reallyClose(); 102 } 103 104 109 public void addConnectionEventListener(ConnectionEventListener listener) 110 { 111 } 113 114 119 public void removeConnectionEventListener(ConnectionEventListener listener) 120 { 121 } 123 } 124 | Popular Tags |