Skip to content
Advertisement

Tag: jta

javax.transaction.Transactional vs org.springframework.transaction.annotation.Transactional

I don’t understand what is the actual difference between annotations javax.transaction.Transactional and org.springframework.transaction.annotation.Transactional? Is org.springframework.transaction.annotation.Transactional an extension of javax.transaction.Transactional or they have totally different meaning? When should each of them be used? Spring @Transactinal in service layer and javax in DAO? Thanks for answering. Answer Spring has defined its own Transactional annotation to make Spring bean methods transactional, years ago.

Advertisement