diff --git a/pom.xml b/pom.xml index 230212304..186d27465 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,7 @@ war + 2.7.7 1.7.1 1.4 3.1 @@ -70,6 +71,7 @@ 2.4 [2.2.1,3.1.0) 2.3 + 2.0 5.1.22 UTF-8 UTF-8 @@ -353,88 +355,20 @@ - - org.mortbay.jetty - jetty-maven-plugin - ${maven-jetty-plugin.version} - - - /${project.name} - - - 9966 - shutterdown - - - logback.configurationFile - ./src/main/resources/logback.xml - - - com.sun.management.jmxremote - true - - - com.sun.management.jmxremote.port - 8050 - - - com.sun.management.jmxremote.ssl - false - - - com.sun.management.jmxremote.authenticate - false - - - - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - runtime - - - org.slf4j - slf4j-api - ${slf4j.version} - runtime - - - org.slf4j - jul-to-slf4j - ${slf4j.version} - runtime - - - ch.qos.logback - logback-classic - ${logback.version} - runtime - - - commons-dbcp - commons-dbcp - ${commons-dbcp.version} - runtime - - - commons-pool - commons-pool - ${commons-pool.version} - runtime - - - org.jdom - jdom - ${jdom.version} - runtime - - - + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + ${maven-tomcat-plugin.version} + + tomcat-development-server + 9966 + /petclinic + + + + cleans the project +- mvn clean test --> cleans the project and runs all tests +- mvn clean package --> cleans the project and builds the WAR + +After building the project with "mvn clean package", 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. + +For MySQL, you'll need to use the corresponding schema and SQL scripts in +the "db/mysql" subdirectory. Follow the steps outlined in +"db/mysql/petclinic_db_setup_mysql.txt" for explicit details. + +In you intend to use a local DataSource, the JDBC settings can be adapted +in "src/main/resources/jdbc.properties". To use a JTA DataSource, you need +to set up corresponding DataSources in your Java EE container. + +Notes on enabling Log4J: + - Log4J is disabled by default due to issues with JBoss. + - Uncomment the Log4J listener in "WEB-INF/web.xml" to enable logging. + +Notes on service static resources: + - Most web containers provide a 'default' servlet for serving static + resources; Petclinic relies on it for its images. + - On containers without such a mapping (ex: GlassFish), uncomment the + 'default' declaration in "WEB-INF/web.xml". + +========================================================================== +=== JPA on Tomcat +========================================================================== + +This section provides tips on using the Java Persistence API (JPA) on +Apache Tomcat 4.x or higher with a persistence provider that requires +class instrumentation (such as TopLink Essentials). + +To use JPA class instrumentation, Tomcat has to be instructed to use a +custom class loader which supports instrumentation. See the JPA section of +the Spring reference manual for complete details. + +The basic steps are: + - Copy "org.springframework.instrument.tomcat-3.0.0.RELEASE.jar" from the + Spring distribution to "TOMCAT_HOME/server/lib". + - If you're running on Tomcat 5.x, modify "TOMCAT_HOME/conf/server.xml" + and add a new "" element for 'petclinic' (see below). You can + alternatively deploy the WAR including "META-INF/context.xml" from this + sample application's "src/main/webapp" directory, in which case you + will need to uncomment the Loader element in that file to enable the + use of the TomcatInstrumentableClassLoader. + + + + + ... + diff --git a/src/main/resources/spring/dao-config.xml b/src/main/resources/spring/dao-config.xml index c29a9bd4c..620f88527 100644 --- a/src/main/resources/spring/dao-config.xml +++ b/src/main/resources/spring/dao-config.xml @@ -16,7 +16,7 @@ http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> - +