public static SQLException mapException ( WSJdbcWrapper jdbcWrapper , SQLException sqlX ) { Object mapper = null ; WSJdbcConnection connWrapper = null ; if ( jdbcWrapper instanceof WSJdbcObject ) { // Use the connection and managed connection. connWrapper = ( WSJdbcConnection ) ( ( WSJdbcObject ) jdbcWrapper ) . getConnectionWrapper ( ) ; if ( connWrapper != null ) { mapper = connWrapper . isClosed ( ) ? connWrapper . mcf : connWrapper . managedConn ; } } else mapper = jdbcWrapper . mcf ; return ( SQLException ) AdapterUtil . mapException ( sqlX , connWrapper , mapper , true ) ; }
Map a SQLException . And if it s a connection error send a CONNECTION_ERROR_OCCURRED ConnectionEvent to all listeners of the Managed Connection .