Skip to content

Commit

Permalink
CAMEL-10685: Use SLF4J instead of commons logging
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti committed Apr 13, 2017
1 parent f248eb4 commit ed0bae4
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@
*/
package org.apache.camel.cdi.transaction;

import java.util.logging.Level;
import java.util.logging.Logger;

import javax.inject.Named;
import javax.transaction.Transaction;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Named("PROPAGATION_NESTED")
public class NestedJtaTransactionPolicy extends TransactionalJtaTransactionPolicy {

private final Logger logger = Logger.getLogger(NestedJtaTransactionPolicy.class.getCanonicalName());
private final Logger logger = LoggerFactory.getLogger(NestedJtaTransactionPolicy.class.getCanonicalName());

@Override
public void run(final Runnable runnable) throws Throwable {

Transaction suspendedTransaction = null;
boolean rollback = false;
try {
Expand All @@ -44,12 +43,12 @@ public void run(final Runnable runnable) throws Throwable {
rollback(false);
}
} catch (Exception e) {
logger.log(Level.WARNING, "Could not do rollback of outer transaction", e);
logger.warn("Could not do rollback of outer transaction", e);
}
try {
resumeTransaction(suspendedTransaction);
} catch (Exception e) {
logger.log(Level.WARNING, "Could not resume outer transaction", e);
logger.warn("Could not resume outer transaction", e);
}
}
}
Expand Down

0 comments on commit ed0bae4

Please sign in to comment.