X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Ftest%2Fpersistence%2Fpackage-info.java;h=543166662e8446ea71bef4e181284b2e58583dda;hb=3cb4be75d0e7ae55c59a8afa31407db34860a7b2;hp=3005512588ce7977c69e07eff61a88e0ef158127;hpb=87bfe9fe1ac87890640d475765a6e42bc4293162;p=utils 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