public final class JDBCExceptionReporter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JDBCExceptionReporter.StandardWarningHandler |
static interface |
JDBCExceptionReporter.WarningHandler
Contract for handling
warnings |
static class |
JDBCExceptionReporter.WarningHandlerLoggingSupport
Basic support for
JDBCExceptionReporter.WarningHandler implementations which log |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXCEPTION_MSG |
static String |
DEFAULT_WARNING_MSG |
static org.slf4j.Logger |
log |
static JDBCExceptionReporter.StandardWarningHandler |
STANDARD_WARNING_HANDLER |
Modifier and Type | Method and Description |
---|---|
static void |
handleAndClearWarnings(Connection connection,
JDBCExceptionReporter.WarningHandler handler)
General purpose handling of warnings associated with a JDBC
Connection . |
static void |
handleAndClearWarnings(Statement statement,
JDBCExceptionReporter.WarningHandler handler)
General purpose handling of warnings associated with a JDBC
Statement . |
static void |
logAndClearWarnings(Connection connection)
Standard (legacy) behavior for logging warnings associated with a JDBC
Connection and clearing them. |
static void |
logExceptions(SQLException ex) |
static void |
logExceptions(SQLException ex,
String message) |
static void |
logWarnings(SQLWarning warning)
Deprecated.
|
static void |
logWarnings(SQLWarning warning,
String message)
Deprecated.
|
static void |
walkWarnings(SQLWarning warning,
JDBCExceptionReporter.WarningHandler handler) |
public static final org.slf4j.Logger log
public static final String DEFAULT_EXCEPTION_MSG
public static final String DEFAULT_WARNING_MSG
public static JDBCExceptionReporter.StandardWarningHandler STANDARD_WARNING_HANDLER
public static void logAndClearWarnings(Connection connection)
Connection
and clearing them.
Calls handleAndClearWarnings(Connection, WarningHandler)
using STANDARD_WARNING_HANDLER
connection
- The JDBC connection potentially containing warningspublic static void handleAndClearWarnings(Connection connection, JDBCExceptionReporter.WarningHandler handler)
Connection
.connection
- The JDBC connection potentially containing warningshandler
- The handler for each individual warning in the stack.walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)
public static void handleAndClearWarnings(Statement statement, JDBCExceptionReporter.WarningHandler handler)
Statement
.statement
- The JDBC statement potentially containing warningshandler
- The handler for each individual warning in the stack.walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)
@Deprecated public static void logWarnings(SQLWarning warning)
walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)
insteaddefault message
warning
- The warning to log@Deprecated public static void logWarnings(SQLWarning warning, String message)
walkWarnings(java.sql.SQLWarning, org.hibernate.util.JDBCExceptionReporter.WarningHandler)
insteadwarning
- The warning to logmessage
- The prologue messagepublic static void walkWarnings(SQLWarning warning, JDBCExceptionReporter.WarningHandler handler)
public static void logExceptions(SQLException ex)
public static void logExceptions(SQLException ex, String message)
Copyright © 2002-2015 Red Hat Middleware, LLC. All Rights Reserved