I'm currently dealing with a codebase where the business code uses the @Transactional annotation from the javax.transaction package. However, this software also uses spring-data JPA repositories, which uses the Spring @Transactional annotation. Since we discovered this, we switched to using Spring @Transactional annotation on all newer business code.
My questions are:
- Does using both different annotation cause any kind of problem ? I'm guessing not because we discovered the problem during a code refactoring but we didn't notice any defect related to this problem. However, I prefer to be sure
- What's the difference in behavior between the two annotations ?
Thanks in advance.