I am using Hibernate and Spring on a small personal project. Well, still a newbie in this area, so would like to raise some basic questions re transactions.
It seems that I have to declare transactional manager and annotate the DAO class as @Transactional(propagation = Propagation.REQUIRED, readOnly = false). Otherwise i get some strange exceptions or the entities are not saved in the database. Is there actually a must to use transactions? Can't i save data in the database without using them (i thought that MySQL ISAM tables don't support transactions), how would you use them then?
What is the best place to put the @Transactional attribute on? Currently its declared on my generic HibernateDAO superclass, possibly the deepest level it can be. I guess that's not the best place for that. But if moving it up, I would wind up having it in the Spring MVC Controller, which is arguably also inappropriate place for that. So far there is no other service layer, because i do nothing except for saving and serving words and definitions from the database.
Many thanks