Posts

Showing posts with the label Java web project development
Image
Hibernate Integration with Spring Hear comes the integration of Hibernate and Spring Prerequisite Steps 1) Create java class (bean) Employee 2) Create Database and table employee 3) Create hbm.xml 4) make all mappings 3.4) Creating the Spring Configuration File This section deals with configuring the various information needed for the Spring Framework. In Spring, all the business objects are configured in Xml file and the configured business objects are called Spring Beans . These Spring Beans are maintained by the IOC which is given to the Client Application upon request. Let us define a data source as follows, spring-hibernate.xml Refer : http://www.javabeat.net/articles/42-integrating-spring-framework-with- hibernate-orm-framewo-3.html The above bean defines a data-source of type 'org.apache.commons.dbcp.BasicDataSource' . More importantly, it defines the various connection properties that are needed for accessing the database. For accessing the ...