Package ru.vyarus.guicey.jdbi3.tx
Annotation Type InTransaction
-
@Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface InTransactionAnnotation for unit of work and transaction declaration. Code executed under the scope of annotation will share the same transaction (and handle).Use on class to mark all methods as transactional.
Support nesting: nested annotated elements will participate in outer transaction (and so exceptions will rollback entire transaction). If nested transaction configuration contradict with ongoing transaction then exception will be thrown (e.g. different isolation level or write required under read only transaction).
NOTE: jdbi transaction annotation (
Transaction) is not used to avoid internal jdbi transaction handling mechanism which may contradict with guice-central transactional mechanism (because simply jdbi is not aware of it and did not expect anyone to manage transaction instead).- Since:
- 31.08.2018