beautypg.com

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

Page 153

background image





….
….

5.

The path of the Commons DBCP JAR file (

commons-dbcp.jar

) was set.

A new

tag was added to specify the path of the Commons DBCP JAR file

location under the

tag:





….
….

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

tag, with value

/WEB-INF/applicationContext-jdbc.xml

, was

commented out.

The

tag, with value

/WEB-INF/applicationContext-hibernate.xml

,

in the

\samples\petclinic\war\WEB-INF\web.xml

file under the

tag with value

contextConfigLocation

, was uncommented.

Before the change:


contextConfigLocation
/WEB-INF/applicationContext-jdbc.xml


After the change:


contextConfigLocation
/WEB-INF/applicationContext-hibernate.xml