petclinic-uncached

SPR-6447 + improve DataSource setup

11/26/2009 4:30:49 PM

Changes

db/build.xml 85(+0 -85)

db/dropTables.txt 7(+0 -7)

db/emptyDB.txt 7(+0 -7)

db/mysql/createDB.txt 3(+0 -3)

db/mysql/dropDB.txt 1(+0 -1)

db/mysql/initDB.txt 58(+0 -58)

db/mysql/petclinic_db_setup_mysql.txt 22(+0 -22)

db/mysql/petclinic_tomcat_mysql.xml 64(+0 -64)

db/petclinic_tomcat_all.xml 112(+0 -112)

db/populateDB.txt 53(+0 -53)

pom.xml 20(+15 -5)

Details

pom.xml 20(+15 -5)

diff --git a/pom.xml b/pom.xml
index 10e9ca9..6174812 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,8 +3,8 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.springframework.samples</groupId>
-	<artifactId>petclinic-classic</artifactId>
-	<name>petclinic-classic</name>
+	<artifactId>petclinic</artifactId>
+	<name>petclinic</name>
 	<packaging>war</packaging>
 	<version>1.0.0-SNAPSHOT</version>
 	<properties>
@@ -102,6 +102,14 @@
 			<artifactId>com.springsource.org.hsqldb</artifactId>
 			<version>1.8.0.9</version>
 		</dependency>
+		<!-- MySQL JDBC Connector -->
+		<!--
+        <dependency>
+            <groupId>com.mysql.jdbc</groupId>
+            <artifactId>com.springsource.com.mysql.jdbc</artifactId>
+            <version>5.1.6</version>
+        </dependency>
+        -->
 		<dependency>
 			<groupId>org.jdom</groupId>
 			<artifactId>com.springsource.org.jdom</artifactId>
@@ -114,6 +122,11 @@
 		</dependency>
 		<dependency>
 			<groupId>org.springframework</groupId>
+			<artifactId>org.springframework.aspects</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
 			<artifactId>org.springframework.orm</artifactId>
 			<version>${spring.version}</version>
 		</dependency>
@@ -156,19 +169,16 @@
             <groupId>org.slf4j</groupId>
             <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
             <version>${slf4j.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>com.springsource.slf4j.api</artifactId>
             <version>${slf4j.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>com.springsource.slf4j.log4j</artifactId>
             <version>${slf4j.version}</version>
-            <scope>provided</scope>
             <exclusions>
                 <exclusion>
                     <groupId>log4j</groupId>
diff --git a/src/main/resources/db/db_readme.txt b/src/main/resources/db/db_readme.txt
new file mode 100644
index 0000000..80deff0
--- /dev/null
+++ b/src/main/resources/db/db_readme.txt
@@ -0,0 +1,15 @@
+================================================================================
+===        Spring PetClinic sample application - Database Configuration      ===
+================================================================================
+
+@author Costin Leau
+
+--------------------------------------------------------------------------------
+
+In its default configuration, Petclinic uses an in-memory database (HSQLDB) which
+gets populated at startup with data. Since there is no persistent support, once
+the application is destroyed, so is the database.
+If a persistent database configuration is chosen, make sure to change the datasource
+inside the relevant application-*.xml so that the schema and the data do not get 
+inserted each time the application is started. Additionally, update the jdbc.properties
+file to reflect your change.
\ No newline at end of file