0 votes
1 view
in Java by (3.9k points)
Should you place the @Transactional in the DAO classes and/or their methods or is it better to annotate the Service classes which are calling using the DAO objects? Or does it make sense to annotate both "layers"?

1 Answer

0 votes
by (46.1k points)

The transactions belong to the Service layer. It's the one that apprehends about units of work and use cases. It's the right case if you have several DAOs injected into a Service that needs to work together in a single transaction. It’s happening because of the Eclipse is to Java 1.5

eg. REPEATABLE READ

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...