Annotation Type WithTransaction
-
@Inherited @InterceptorBinding @Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface WithTransaction
Instructs Panache to trigger theUnireturned from the intercepted method within a scope of a reactiveMutiny.Transaction. If a reactive session exists when theUnireturned from the annotated method is triggered, then this session is reused. Otherwise, a new session is opened and eventually closed when theUnicompletes.A method annotated with this annotation must return
Uni. If declared on a class then all methods that are intercepted must returnUni.- See Also:
Mutiny.SessionFactory.withTransaction(java.util.function.Function)