From 3cb4be75d0e7ae55c59a8afa31407db34860a7b2 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 17 Jul 2010 22:02:14 +0000 Subject: [PATCH] --- .../test/persistence/package-info.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/enterprise/src/main/java/org/wamblee/test/persistence/package-info.java b/test/enterprise/src/main/java/org/wamblee/test/persistence/package-info.java index 30055125..54316666 100644 --- a/test/enterprise/src/main/java/org/wamblee/test/persistence/package-info.java +++ b/test/enterprise/src/main/java/org/wamblee/test/persistence/package-info.java @@ -39,6 +39,8 @@ * *
  • Testing a service that requires a transaction *
  • + *
  • Controlling transactions through a UserTransaction + *
  • * * *

    @@ -166,6 +168,12 @@ * }); * * + *

    + * Note that in addition to this method it is also possible to directly control transactions + * through {@link JpaBuilder#begin()}, {@link JpaBuilder#commit(javax.persistence.EntityManager)}, + * and {@link JpaBuilder#rollback(javax.persistence.EntityManager)}. + *

    + * * *

    JPA testing combined with JDBC and DBUnit

    *
    @@ -197,7 +205,18 @@ * is in fact a so-called contextual reference. * Next, the proxy is obtained from the factory. Invoking any method on it will make sure a new * transaction is started and a new entity manager is created for the scope of that transaction. - *

    + *

    + * + * + *

    Controlling transactions through a UserTransaction

    + *
    + * + *

    + * It is also possible to manage JPA transaction through a UserTransaction. + * This is mostly useful if you are test software that uses UserTransaction for + * managing transactions, or if you want to manage multiple transactional resources. + * See the explanation at {@link org.wamblee.test.transactions.SimpleTransactionManager} for more details. + *

    * * *

    Design overview

    -- 2.31.1