Modified files, Web.xml – HP Integrity NonStop J-Series User Manual

Page 136

Advertising
background image

this.catalog=catalog;
addConnectionProperty("catalog",this.catalog);
}

public void setSchema(String schema) {
this.schema=schema;
addConnectionProperty("schema",this.schema);
}
}

Modified Files

The following files were modified to customize PetClinic.

web.xml

(<My SASH Home>\spring\samples\petclinic\src\main\webapp\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 key 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 and
therefore the web.xml file was modified to enable Hibernate.

Changes to the web.xml file

By default, the PetClinic sample application 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.

The <param-value>tag with value /WEB-INF/applicationContext-hibernate.xml
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>
<!--
<param-value>/WEB-INF/applicationContext-jdbc.xml</param-value>
<param-value>/WEB-INF/applicationContext-jpa.xml</param-value>
-->

<!--

136

Customizing Sample Applications

Advertising
This manual is related to the following products: