beautypg.com

HP Integrity NonStop H-Series User Manual

Page 390

background image

Example of Integrating Hibernate into Spring 9

true





2.

Modify the bean instance of the

EmployeeDao

class to add the reference of the Hibernate

SessionFactory, as shown:





After modification, the

applicationContext.xml

file should appear as:


xmlns="http://www.springframework.org/schema/beans"
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">

class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close">

${jdbc.driver}


${jdbc.url}


${jdbc.user}


${jdbc.password}




${jdbc.catalog}


${jdbc.schema}







Employee.hbm.xml




org.hibernate.dialect.SqlmxDialect
true













390

Integrating Hibernate into Spring

This manual is related to the following products: