From 54bb602a768cc83b292d4481cb8ab8cf541b3dfd Mon Sep 17 00:00:00 2001
From: Erik Brakkee
@@ -68,8 +68,9 @@ import org.apache.wicket.protocol.http.WebRequestCycle; */ public class OpenTransactionInViewRequestCycle extends WebRequestCycle { - private static final Logger LOG = Logger.getLogger(OpenTransactionInViewRequestCycle.class.getName()); - + private static final Logger LOG = Logger + .getLogger(OpenTransactionInViewRequestCycle.class.getName()); + private static final String JAVA_COMP_USER_TRANSACTION_JNDI = "java:comp/UserTransaction"; private UserTransaction userTransaction; @@ -102,15 +103,19 @@ public class OpenTransactionInViewRequestCycle extends WebRequestCycle { @Override protected void onEndRequest() { try { - if ( LOG.isLoggable(Level.FINEST)) { - LOG.finest("Transaction status: " + userTransaction.getStatus()); + if (LOG.isLoggable(Level.FINEST)) { + LOG + .finest("Transaction status: " + + userTransaction.getStatus()); } if (userTransaction.getStatus() == Status.STATUS_ACTIVE) { userTransaction.commit(); } else if (userTransaction.getStatus() == Status.STATUS_MARKED_ROLLBACK) { userTransaction.rollback(); - } else { - LOG.warning("Transaction status is '" + userTransaction.getStatus() + "' not committing or rolling back"); + } else { + LOG.warning("Transaction status is '" + + userTransaction.getStatus() + + "' not committing or rolling back"); } } catch (Exception e) { throw new RuntimeException("Could not commit transaction", e); diff --git a/wicket/joe/src/main/java/org/wamblee/wicket/transactions/package-info.java b/wicket/joe/src/main/java/org/wamblee/wicket/transactions/package-info.java index 8163de7d..aa536f7a 100644 --- a/wicket/joe/src/main/java/org/wamblee/wicket/transactions/package-info.java +++ b/wicket/joe/src/main/java/org/wamblee/wicket/transactions/package-info.java @@ -14,7 +14,7 @@ * limitations under the License. */ /** - * This package provide transaction support for wicket making it really easy + * This package provides transaction support for wicket making it really easy * to work with transactions. */ package org.wamblee.wicket.transactions; \ No newline at end of file -- 2.31.1