Web.xml – HP Integrity NonStop H-Series User Manual
Page 153

<copy todir="${weblib.dir}" preservelastmodified="true">
<fileset dir= “./etc”>
<include name="hibernate3sqlmx.jar"/>
</fileset>
….
….
</copy>
5.
The path of the Commons DBCP JAR file (
commons-dbcp.jar
) was set.
A new
<fileset>
tag was added to specify the path of the Commons DBCP JAR file
location under the
<path>
tag:
<path id="master-classpath">
<fileset dir="${spring.root}/lib/jakarta-commons">
<include name="commons-dbcp.jar"/>
</fileset>
….
….
</path>
web.xml
(
<Spring Home>\samples\petclinic\war\WEB-INF\web.xml
)
This is the deployment descriptor configuration file for PetClinic. This file was modified to enable
Hibernate because PetClinic fails during
Add
operations when used with JDBC. The
Add
operation
requires that the primary keys ID values be generated for all the tables to be auto-incremented.
This feature of auto-incrementing is not supported by the SQL/MX database.
Changes to the
web.xml
file
By default, PetClinic, distributed with the Spring source, is configured to use the HSQLDB
database via JDBC.
The following modifications were made to connect the SQL/MX database using Hibernate:
•
The
<param-value>
tag, with value
/WEB-INF/applicationContext-jdbc.xml
, was
commented out.
•
The
<param-value>
tag, with value
/WEB-INF/applicationContext-hibernate.xml
,
in the
<Spring Home>\samples\petclinic\war\WEB-INF\web.xml
file under the
<param-name>
tag with value
contextConfigLocation
, was uncommented.
Before the change:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-jdbc.xml</param-value>
<!--
<param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
<param-value>/WEB-INF/applicationContext-jpa.xml</param-value>
-->
<!--
To use the JPA variant above,
you will need to enable Spring load-time weaving in your
server environment.
See PetClinic's readme and/or Spring's JPA documentation for
information on how to do this.
-->
</context-param>
After the change:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
<!--
Customizing PetClinic
153