I think transactions belong on the service layer. It’s the one that knows about units of work and use cases. It’s the right answer if you have several DAOs injected into a service that need to work together in a single transaction.
More Related Contents:
- Does Spring @Transactional attribute work on a private method?
- What’s the difference between @Component, @Repository & @Service annotations in Spring?
- Difference between and
- Only using @JsonIgnore during serialization, but not deserialization
- @RequestBody and @ResponseBody annotations in Spring
- Xml configuration versus Annotation based configuration [closed]
- How to inject a Map using the @Value Spring Annotation?
- JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object
- How to configure MappingJacksonHttpMessageConverter while using spring annotation-based configuration?
- Why does Hibernate disable INSERT batching when using an IDENTITY identifier generator
- Transaction marked as rollback only: How do I find the cause
- @Transactional(propagation=Propagation.REQUIRED)
- How can I reload properties file in Spring 4 using annotations?
- Do you need a database transaction for reading data?
- How to scan multiple paths using the @ComponentScan annotation?
- How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?
- Spring: define @RequestMapping value in a properties file
- Where should I put @Transactional annotation: at an interface definition or at an implementing class?
- Spring annotation-based DI vs xml configuration?
- Understanding Spring transactions – What happens when a transactional method calls another transactional method?
- HibernateException: Couldn’t obtain transaction-synchronized Session for current thread
- Differences between requires_new and nested propagation in Spring transactions
- Spring MVC: difference between and tags? [duplicate]
- Where to put @Transactional? In interface specification or implementation? [duplicate]
- DAO and Service layers (JPA/Hibernate + Spring) [duplicate]
- Creating a post commit when using transaction in Spring
- How to configure transaction management for working with 2 different db in Spring?
- Spring transaction: rollback on Exception or Throwable
- Hibernate: CRUD Generic DAO
- What are annotations and how do they actually work for frameworks like Spring?