Modifying the applicationcontext.xml file, Modifying the, Applicationcontext.xml – HP Integrity NonStop H-Series User Manual
Page 405: File

this.email = email;
}
}
Modifying the
applicationContext.xml
File
Modify the
EmpInfo/WebContent/WEB-INF/applicationContext.xml
file, so that it uses
JPA
EntityManagerFactory
to connect to the employee SQL/MX database table, in place of
Hibernate SessionFactory.
To modify the
applicationContext.xml
file, complete the following steps:
1.
Specify the
EntityManagerFactory
in the
applicationContext.xml
file as shown:
2.
Remove the
<bean>
tag with the
sessionFactory
ID from the
applicationContext.xml
file.
3.
Replace the reference of Hibernate
sessionFactory
with the JPA
entityManagerFactory
in the bean instance of the
EmployeeDao
class, as shown:
After modification, the
applicationContext.xml
file should appear as:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
destroy-method="close">
${jdbc.catalog}
Example of Integrating JPA with Hibernate into Spring
405