X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsupport%2Fpersistence%2Fpackage-info.java;h=1ea78e255d6e9e6bb1c712431c4dac3085637de0;hb=bd197313c85d3ee6336e7e7cbf7ff706247df9b4;hp=d38be5796fed215c5341d165ce549af23a5d4bbd;hpb=d8fcef17270fcc417ed1aa7fe3f24cbfa5e363d6;p=utils diff --git a/test/enterprise/src/main/java/org/wamblee/support/persistence/package-info.java b/test/enterprise/src/main/java/org/wamblee/support/persistence/package-info.java index d38be579..1ea78e25 100644 --- a/test/enterprise/src/main/java/org/wamblee/support/persistence/package-info.java +++ b/test/enterprise/src/main/java/org/wamblee/support/persistence/package-info.java @@ -72,6 +72,12 @@ * This also requires a number of environment variables or system properties to be set, * see {@link ExternalDatabase}. * + *

+ * However, the most convenient way to set the capabilities is usually to set a system property or environment + * variable see the javadocs of {@link DatabaseBuilder}. and + * specifically {@link DatabaseBuilder#DB_CAPABILITIES_PROP} + *

+ * * * *

Executing code within a JDBC transaction

@@ -189,26 +195,50 @@ *

* *
- *

design overview

+ *

Design overview

*
* - *

Database transaparency

- * - *

Testing using JDBC and DBUnit

+ *

Database transparency

* + *
+ * database + *
+ *

+ * {@link DatabaseProvider} uses java.util.ServiceLoader to find all implementations + * of {@link DatabaseProvider} on the classpath. It then asks the database providers whether + * they support the required capabilities (by default inmemory), and the first provider that + * supports the capabilities is used to create the database. + *

+ *

+ * Note that the Database interface is not intended to always create a database. + * It will do so for {@link DerbyDatabase} (inmemory), but with {@link ExternalDatabase} + * it simply connects to an external database based on system properties or environment + * variables. + *

+ * *

JPA tester overview

* + *
+ * database + *
+ * + *

JPATester is responsible for:

+ * * * */ package org.wamblee.support.persistence; -import static org.mockito.Mockito.*; - -import javax.persistence.EntityManager; - -import org.junit.Before; -import org.wamblee.support.persistence.JpaBuilder.JpaUnitOfWork; -import org.wamblee.support.persistence.TransactionProxyFactoryTestBase.Service; -