Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-DAS-beta1
-
None
-
Patch Available
Description
Today we rely on copying the java/das/samples/companyweb/dasttest database to a tomcat installation, so the canned database is available for DAS sample app companyweb. A better way for doing this would be to have a servlet (dbInit) that would load on app startup and create necessary tables and populate it with canned information if the db is not available. This would make deployment easier, would avoid external dependencies on the sample distribution, and would probably make it easier to execute htmlUnit multiple times, as the htmlUnit could call the servlet to force refresh of the database data.
For an example on how to do this, please take a look at dbInit servlet in BigBank sample application :
https://svn.apache.org/repos/asf/incubator/tuscany/java/sampleapps/bigbank/account/src/main/java/bigbank/account/services/accountdb/AccountDBInit.java