diff --git a/org.springframework.samples.petclinic/db/mysql/petclinic_db_setup_mysql.txt b/org.springframework.samples.petclinic/db/mysql/petclinic_db_setup_mysql.txt index 3a2b22e0ad..66727e190a 100644 --- a/org.springframework.samples.petclinic/db/mysql/petclinic_db_setup_mysql.txt +++ b/org.springframework.samples.petclinic/db/mysql/petclinic_db_setup_mysql.txt @@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -1) Download and install the MySQL database (e.g., MySQL Community Server 5.0.x), +1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x), which can be found here: http://dev.mysql.com/downloads/ 2) Download Connector/J, the MySQL JDBC driver (e.g., Connector/J 5.1.x), which diff --git a/org.springframework.samples.petclinic/readme.txt b/org.springframework.samples.petclinic/readme.txt index 6dcb667d94..aee19b7ffe 100644 --- a/org.springframework.samples.petclinic/readme.txt +++ b/org.springframework.samples.petclinic/readme.txt @@ -59,10 +59,10 @@ Available build commands: - ant clean jar --> cleans the project and builds the WAR After building the project with "ant clean jar", you will find the -resulting WAR file in the "target" directory. By default, an embedded -HSQLDB instance in configured. No other steps are necessary to get the -data source up and running: you can simply deploy the built WAR file -directly to your Servlet container. +resulting WAR file in the "target/artifacts" directory. By default, an +embedded HSQLDB instance in configured. No other steps are necessary to +get the data source up and running: you can simply deploy the built WAR +file directly to your Servlet container. For MySQL, you'll need to use the corresponding schema and SQL scripts in the "db/mysql" subdirectory. Follow the steps outlined in diff --git a/org.springframework.samples.petclinic/src/main/webapp/html/tutorial.html b/org.springframework.samples.petclinic/src/main/webapp/html/tutorial.html index 91bd57e13c..c368efc349 100644 --- a/org.springframework.samples.petclinic/src/main/webapp/html/tutorial.html +++ b/org.springframework.samples.petclinic/src/main/webapp/html/tutorial.html @@ -13,7 +13,8 @@

The Spring PetClinic Application

- + + @@ -134,7 +135,7 @@ specifically for Apache Tomcat. These files specify container-supplied connection-pooled data sources. It is not necessary to use these files. The application has been configured by default to use a data source - without connection pooling to simplify usage. Configuration details are + with connection pooling. Configuration details are provided in the Developer Instructions section. The view technologies that are to be used for rendering the application are Java Server Pages (JSP) along with the Java Standard Tag Library (JSTL). @@ -145,7 +146,7 @@ The sample application uses a relational database for data storage. Support has been provided for a choice of 1 of 2 database selections, MySql or HypersonicSQL. HypersonicSQL version 1.8.0 is the default - choice and a copy is provided with the application. It is possible to + choice. It is possible to easily configure the application to use either database. Configuration details are provided in the Developer Instructions section.

@@ -161,8 +162,7 @@ @@ -310,10 +310,10 @@

Spring supports the use of the Apache Commons Logging API. This API provides the ability to use Java 1.4 loggers, the simple Commons loggers, - and Apache Log4J loggers. PetClinic uses Log4J to provide sophisticated + and Apache log4j loggers. PetClinic uses log4j to provide sophisticated and configurable logging capabilities. The file, - war/WEB-INF/log4j.properties - configures the definition of Log4jloggers. + src/main/resources/log4j.properties + configures the definition of log4jloggers.

Business Layer

@@ -503,7 +503,7 @@ org.springframework.samples.petclinic.hibernate.HibernateClinic. To simplify using Hibernate, Spring provides the org.springframework.orm.hibernate3.LocalSessionFactoryBean. - The Hibernate configuration is provided by the file src/petclinic.hbm.xml. + The Hibernate configuration is provided by the file src/main/resources/petclinic.hbm.xml.

Java Persistence API (JPA) Clinic Implementation

@@ -518,8 +518,8 @@ To simplify JPA usage, Spring provides (among other classes) the org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean. The JPA configuration is provided by - src/META-INF/orm.xml and - src/META-INF/persistence.xml. + src/main/resources/META-INF/orm.xml and + src/main/resources/META-INF/persistence.xml.

ApplicationContext

@@ -530,7 +530,7 @@ constitute the Business/Persistence Layer of PetClinic. The following beans are defined in all 3 versions (1 per access strategy) of the PetClinic - war/WEB-INF/applicationContext-*.xml + src/main/webapp/WEB-INF/applicationContext-*.xml file:

@@ -542,7 +542,7 @@ properties file, in this case, JDBC-related settings for the dataSource bean described below - (see src/jdbc.properties). + (see src/main/resources/jdbc.properties).
  • dataSource, which is a singleton bean that defines the implementation of the source @@ -571,14 +571,14 @@

    @@ -652,15 +652,15 @@
  • In web.xml, a "log4jConfigLocation" context-param is specified that sets the location of the - Log4j configuration file. The + log4j configuration file. The default location for this file is /WEB-INF/classes/log4j.properties. Specifying this parameter explicitly allows the location to be changed from the default and is also used to cause periodic - Log4j configuration refresh checks.
  • + log4j configuration refresh checks.
  • In web.xml, a Log4jConfigListener is - specified that will initialize Log4j using + specified that will initialize log4j using the specified configuration file when the web app starts. The Log4jConfigListener is commented out in the file because of a conflict when using JBoss. It should also be @@ -897,7 +897,7 @@ which displays a stack trace and normally wouldn't be used in a production version of an application. It can be seen in action by entering a URL of "editOwner.do" or "editPet.do" with an invalid request parameter, for example: - /petclinic/owner.do?ownerId=-1. + /petclinic/owner.do?ownerId=-1. The handlers for these URLs normally expect to see a respective "ownerId" or "petId" request parameter corresponding to an Owner or Pet in the database. Thus, these handlers will throw a DataAccessException when such @@ -908,7 +908,7 @@ in a production version of an application. It can be seen in action by entering a URL of "editOwner.do" or "editPet.do" without a valid request parameter, for example: - /petclinic/owner.do. + /petclinic/owner.do. The handlers for these URLs normally expect to see a respective "ownerId" or "petId" request parameter and throw a ServletException when such a request parameter is not found.
  • @@ -1025,60 +1025,28 @@

    Downloads

    Ant Setup

    - Make sure that the Ant executable is in your command shell path. Ant - will need to reference classes from JUnit - and the database(s) of interest. Place a copy of any needed jar files in - Ant's /lib directory, i.e.: -

    - - - -

    HSQL Setup

    -

    - Create a new directory containing a copy of the entire contents of - the directory petclinic/db/hsqldb. - The file petclinic.script - is the data file that will be used by the server. It has been - initialized with some sample data. Start a server on the standard port - by executing server.sh(Unix) - or server.bat (Windows) - or alternatively edit the file to select a port of your choosing. - A useful database manager can be started by executing - manager.sh (Unix) - or manager.bat (Windows). - When the application opens, connect to the "HSQL Database Engine - Server" using the default parameters. This tool can also be used to - manage other databases. To use a different port, it will be necessary - to change the PetClinic Database Setup. It may also be necessary to - consult the HSQL documentation for instructions on how to change the port - the server uses. + Make sure that the Ant executable is in your command shell path.

    MYSQL Setup (optional)

    @@ -1126,15 +1094,15 @@ separate log file for the petclinic context. This will separate the container logging for petclinic from that of the other webapps. This should not be confused with the application log file provided through - Log4j. + log4j.
  • An Ant script (db/build.xml) has been provided that can be used to re-initialize either database. To select or configure the data source and database used for the webapp and for testing, you will need to edit the following files:
  • Updated:21.OCT.2007Sam Brannen
    Updated:11.OCT.2009Sam Brannen (Work In Progress: not yet fully updated regarding Spring 3.0)
    21.OCT.2007Sam Brannen
    30.JUN.2006Costin Leau
    01.DEC.2004Ken Krebs
    16.AUG.2003Ken Krebs