X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsupport%2Fpersistence%2Fpackage-info.java;h=979dde6f7c0189c5d4a53f709d610403218de996;hb=dec278a67997ea8e85d10662e31548afd8890ed3;hp=1ea78e255d6e9e6bb1c712431c4dac3085637de0;hpb=bd197313c85d3ee6336e7e7cbf7ff706247df9b4;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()); ** *