SPR-5429 Update Pet Clinic to use HSQL as an embedded database

Created DbcpDataSourceFactory factory bean to create and populate a dbcp based connection pool.  The factory bean is based on EmbeddedDataSourceFactory from the JavaConfig version of Pet Clinic.  The new DbcpDataSourceFactory has been tested with HSQL in embedded and stand-alone modes.
This commit is contained in:
Scott Andrews
2009-01-23 20:33:17 +00:00
parent 9335233618
commit 16c9391069
6 changed files with 404 additions and 10 deletions

View File

@@ -7,6 +7,7 @@
@author Rob Harrop
@author Costin Leau
@author Sam Brannen
@author Scott Andrews
--------------------------------------------------------------------------------
@@ -60,8 +61,13 @@ execution directory. Note that you must do this in order to execute the "tests"
target, as you need the JUnit task from Ant's optional.jar, which is not
included in this sample application.
To execute the web application with its default settings, simply start the
HSQLDB instance in the "db/hsqldb" directory, for example using "server.bat".
By default, an embedded HSQL instance in configured. No other steps are
necessary to get the data source up and running.
To use HSQL as a remote database, open "src/jdbc.properties", comment out all
properties in the "HSQL Embedded Settings" section, uncomment all properties in
the "HSQL Settings" section. Start the remote HSQLDB instance in the
"db/hsqldb" directory, for example using "server.bat".
For MySQL, you'll need to use the corresponding schema and SQL scripts in the
"db/mysql" subdirectory. Follow the steps outlined in