Firstly, itβs possible that Iβm asking for something that was already asked and answered before, but I could not get the search result. Well, in general (or always so far :)) We define transactional annotations at the service level. Typical spring sleep - this is usually
Controller-> Manager-> Dao-> Orm.
Now I have a situation where I need to choose between a domain model based on the clientβs site. Let's say client A uses my domain model, everything is fine, but then another client site will provide me with a web service and will not use our domain model.
Which layer should I replace. I believe that this should be a DAO that will receive data from the web service and send it back to me. Those. two separately written DAO layers and connect depending on the scenario.
Now I realized that we are making a close connection (if there is such a thing or, say, does not have a weak connection) when we put @Transactional on the service level. So many brains cannot be wrong, or they (I doubt it).
So, the question "Where should the" @Transactional "" service level place or DAO be? "and this is the service layer down, I have to replace.
spring dao transactions transactional
Shahzeb Oct 08 '10 at 0:32 2010-10-08 00:32
source share