Changes between Version 1 and Version 2 of Spring


Ignore:
Timestamp:
Nov 11, 2008, 7:20:20 AM (16 years ago)
Author:
erikvaningen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Spring

    v1 v2  
    2828
    2929}}}
    30 '''Chosen Option 2'''. 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.
     30'''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.
     31
     32In option 1 you see as well the annotations @Transactional and @Repository. @Transaction means that every method in this Dao is considered as a transaction. @Repository has to do with the way Spring handles exceptions.