supports
Support a current transaction, execute non-transactionally if none exists. Analogous to EJB transaction attribute of the same name.
호출한 메서드에서 트랜잭션이 있으면 트랜잭션을 잇고, 없으면 없는 채로 놔둔다.
특이점: 호출한 메서드에서 트랜잭션이 없었어도 일단 트랜잭션 생성은 한다. 하지만 적용하지는 않는다!
→ exists, but not active!
mandatory
Support a current transaction, throw an exception if none exists
호출한 메서드에서 트랜잭션이 없으면 IllegalTransactionStateException 예외를 터뜨린다.
not supported
Execute non-transactionally, suspend the current transaction if one exists.
일단 생성은 한다. 그런데 쓰지는 않는다!
물리적 트랜잭션과 논리적 트랜잭션의 차이인 듯 하다!
nested
Execute within a nested transaction if a current transaction exists, behave like REQUIRED otherwise.
Note: Actual creation of a nested transaction will only work on specific transaction managers. Out of the box, this only applies to the JDBC DataSourceTransactionManager.
특정한 transaction manager 에서만 작동한다고 한다.
호출한 메서드에서 트랜잭션이 있으면 NestedTransactionNotSupportedException 예외가 터진다.
호출한 메서드에서 트랜잭션이 없으면 새로 생성을 한다.
mandatory 와 반대 느낌이다.
never
| Execute non-transactionally, throw an exception if a transaction exists.
호출한 메서드에서 트랜잭션이 있으면 IllegalTransactionStateException 예외를 터뜨린다.
호출한 메서드에서 트랜잭션이 없으면 트랜잭션을 생성하기는 하는데 적용하지는 않는다.
이 또한 물리적/논리적 의 차이인 것 같다.