adspace


When are declarative and programmatic transaction management used?

Answer Posted / Sumit Kumar Yadav

Declarative Transaction Management (using annotations like @Transactional) is preferred when transactions are simple, consistent with the method-level boundaries, and easily defined using annotations. On the other hand, Programmatic Transaction Management (using APIs like PlatformTransactionManager) is useful for complex scenarios, such as nested transactions or custom transaction control.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between @controller and @restcontroller in spring?

556


How can you inject java collection in spring?

518


What is lazy class?

490