Changes between Version 3 and Version 4 of Spring
- Timestamp:
- 11/11/08 07:51:58 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Spring
v3 v4 11 11 void saveErikExampleDomainClass(ErikExampleDomain erikExampleDomain){ 12 12 sessionFactory.getCurrentSession().save(erikExampleDomain) 13 14 15 13 }}} 16 14 This configuaration needed: … … 32 30 <property name="sessionFactory" ref="sessionFactory" /> 33 31 </bean> 34 35 32 }}} 36 33 '''Chosen Option 1'''. This option is chosen because (1) one line less of configuration (2) It is working directly with the sessionFactory instead of a Facade like HibernateTemplate. Working with a template can have advantages. However in case of Hibernate, Spring has little to add because Hibernate is a very mature package. (3) SessionFactory is directly available. This might be necessary in cases of more advanced use of Hibernate.