October 2017
Intermediate to advanced
396 pages
10h 2m
English
As the best approach for configuring Hibernate and other persistence technologies in any enterprise application, business objects should be separate from the hard-coded resource lookups such as a JDBC DataSource or Hibernate SessionFactory. You can define these resources as beans in the Spring container. But business objects require the references of these resources, such as SessionFactory and JDBC DataSource, to access them. Let's see the following DAO class which has SessionFactory to access data for the application:
public class AccountDaoImpl implements AccountDao { private SessionFactory sessionFactory; public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory ...Read now
Unlock full access