From 723dcb5cbfde9b010faa0e70da51449e5654ae03 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Wed, 3 May 2017 15:38:04 +0200 Subject: [PATCH] [#6169] Document exception propagation in transaction API Javadoc --- jOOQ/src/main/java/org/jooq/DSLContext.java | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index e6d1f8a263..0c72c1f49f 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -286,6 +286,14 @@ public interface DSLContext extends Scope , AutoCloseable { * * @param transactional The transactional code * @return The transactional outcome + * @throws RuntimeException any runtime exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. + * @throws DataAccessException any database problem that may have arised + * when executing the transactional logic, or a + * wrapper for any checked exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. */ T transactionResult(TransactionalCallable transactional); @@ -306,6 +314,14 @@ public interface DSLContext extends Scope , AutoCloseable { * {@link Configuration#transactionProvider()} is not able to * provide context (i.e. currently, it is not a * {@link ThreadLocalTransactionProvider}). + * @throws RuntimeException any runtime exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. + * @throws DataAccessException any database problem that may have arised + * when executing the transactional logic, or a + * wrapper for any checked exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. */ T transactionResult(ContextTransactionalCallable transactional) throws ConfigurationException; @@ -320,6 +336,14 @@ public interface DSLContext extends Scope , AutoCloseable { * create new statements. * * @param transactional The transactional code + * @throws RuntimeException any runtime exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. + * @throws DataAccessException any database problem that may have arised + * when executing the transactional logic, or a + * wrapper for any checked exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. */ void transaction(TransactionalRunnable transactional); @@ -338,6 +362,14 @@ public interface DSLContext extends Scope , AutoCloseable { * {@link Configuration#transactionProvider()} is not able to * provide context (i.e. currently, it is not a * {@link ThreadLocalTransactionProvider}). + * @throws RuntimeException any runtime exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. + * @throws DataAccessException any database problem that may have arised + * when executing the transactional logic, or a + * wrapper for any checked exception thrown by the + * transactional logic, indicating that a rollback + * has occurred. */ void transaction(ContextTransactionalRunnable transactional) throws ConfigurationException;