Manual
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
package="com.hp.empinfo.domain">
<class name="Employee">
<id name="empid">
<column name="emp_id"/>
</id>
<property name="firstname">
<column name="first_name"/>
</property>
<property name="lastname">
<column name="last_name"/>
</property>
<property name="age">
<column name="age"/>
</property>
<property name="email">
<column name="email"/>
</property>
</class>
</hibernate-mapping>
Removing the EmployeeRowMapper.java File
The EmpInfo application uses the EmployeeRowMapper.java class for mapping various
database table entities. Because Hibernate maps database table entities using the Hibernate
mapping file (.hbm file), the EmpInfo application will no longer use the
EmployeeRowMapper.java file for mapping purposes. Therefore, you must delete the
EmployeeRowMapper.java file from the com.hp.empinfo.domain package.
Adding Dependency JAR Files
To incorporate the features of Hibernate in the EmpInfo application, the following JAR files,
other than the ones added while developing EmpInfo application, must be added in the EmpInfo
project library:
Table 19-1 Dependency JAR Files
Source LocationDependency JAR Files
<Spring Home>\lib\antlrantlr-2.7.6.jar
<Spring Home>\lib\cglibcglib-nodep-2.1_3.jar
<Spring Home>\lib\jakarta-commonscommons-dbcp.jar
<Spring Home>\lib\jakarta-commonscommons-pool.jar
<Spring Home>\lib\hibernatehibernate3.jar
<Hibernate Home>\libhibernate3sqlmx.jar
<Spring Home>\lib\j2eejta.jar
<Spring Home>\lib\log4jlog4j-1.2.15.jar
<Spring Home>\lib\slf4jslf4j-api-1.5.0.jar
<Spring Home>\lib\slf4jslf4j-log4j12-1.5.0.jar
394 Integrating Hibernate into Spring