Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import java.lang.invoke.MethodHandles;

import static org.jboss.logging.Logger.Level.ERROR;
import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.WARN;

/**
* Sub-system logging related to JDBC batch execution
Expand All @@ -35,11 +35,7 @@ public interface JdbcBatchLogging extends BasicLogger {
Logger BATCH_LOGGER = Logger.getLogger( NAME );
JdbcBatchLogging BATCH_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), JdbcBatchLogging.class, NAME );

@LogMessage(level = ERROR)
@Message(id = 100501, value = "Exception executing batch [%s], SQL: %s")
void unableToExecuteBatch(Exception e, String sql );

@LogMessage(level = ERROR)
@LogMessage(level = WARN)
@Message(id = 100502, value = "Unable to release batch statement...")
void unableToReleaseBatchStatement();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,10 @@ protected void performExecution() {
}
catch (SQLException e) {
abortBatch( e );
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( e, sql );
throw sqlExceptionHelper.convert( e, "could not execute batch", sql );
}
catch (RuntimeException re) {
abortBatch( re );
BATCH_MESSAGE_LOGGER.unableToExecuteBatch( re, sql );
throw re;
}
} );
Expand Down
Loading