1 19 package com.mysql.jdbc.jdbc2.optional; 20 21 import java.sql.SQLException ; 22 23 import com.mysql.jdbc.SQLError; 24 25 32 abstract class WrapperBase { 33 protected MysqlPooledConnection pooledConnection; 34 35 41 protected void checkAndFireConnectionError(SQLException sqlEx) throws SQLException { 42 if (this.pooledConnection != null) { 43 if (SQLError.SQL_STATE_COMMUNICATION_LINK_FAILURE.equals(sqlEx.getSQLState())) { 44 this.pooledConnection.callListener(MysqlPooledConnection.CONNECTION_ERROR_EVENT, sqlEx); 45 } 46 } 47 48 throw sqlEx; 49 } 50 } | Popular Tags |