X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsupport%2Fpersistence%2Fpackage-info.java;fp=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsupport%2Fpersistence%2Fpackage-info.java;h=979dde6f7c0189c5d4a53f709d610403218de996;hb=b57cbdcefda8db670154b97615af84bcada13349;hp=1ea78e255d6e9e6bb1c712431c4dac3085637de0;hpb=8d321e0d26d7d1d8c461fc9ca8bd7105e86e6ac2;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 1ea78e25..979dde6f 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 @@ -42,7 +42,7 @@ * * *
- * See the design overview for a an overview of the design. + * See also the design overview. *
* * @@ -53,9 +53,13 @@ * Database db = DatabaseBuilder.getDatabase(); * DataSource dataSource = db.start(); * + ** If nothing is specified in the user's environment, an inmemory database is started (derby). - * Using the datasource is just standard JDBC now. - * Stopping the database + * Using the datasource is just standard JDBC now. + *
+ *+ * After a test it is good practice to stop the database: + *
** db.stop(); *@@ -75,7 +79,7 @@ *
* 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}
+ * specifically DatabaseBuilder.DB_CAPABILITIES_PROP
*
To work with DBUnit, {@link DatabaseUtils#createDbTester(org.dbunit.dataset.filter.ITableFilterSimple)} + *
To work with DBUnit,
+ * DatabaseUtils#createDbTester(org.dbunit.dataset.filter.ITableFilterSimple)
* must be used passing it in the tables to use in the form of a {@link org.dbunit.dataset.filter.ITableFilterSimple}
* object.
Second step is to make sure that all entities are listed explicitly in your - *
persistence.xml. Currently, class path scanning appears to fail when + *
persistence.xml
. Currently, class path scanning appears to fail when
* run from junit.
* Specifying all entities explicitly is not necessarily a bad thing as it is also more efficient.
*
@@ -168,8 +173,8 @@
* get them directly from the JPATester
after initializing it:
* * builder = jpaTester.getJpaBuilder(); - * dbtester = jpaTester.getDbUtils().createDbTester(new MyTables()); * dbutils = jpaTester.getDbUtils(); + * dbtester = dbutils.createDbTester(new MyTables()); ** *