-
Notifications
You must be signed in to change notification settings - Fork 118
Description
In a small demo project I wrote, I found that when using the JTA Module if a @transactional method calls another @transactional method, then the interceptor will fail.
Because of JTA complexities, there are likely a wide variety of methods combinations that should work. For example,
@transactional method1 calling @transactional method2 - method2 should be a part of the same transaction as method1 (both of these annotations default to REQUIRED which is a reasonable default and should just work). I think this is by far the most common use case.
@transactional method1 calling @transactional(NEVER) method2 - I think this should fail.
@transactional method1 calling @transactional(REQUIRES_NEW) method2 - method2 should start a new nested transaction.
etc.
This can get complex very quickly, but we should probably attempt to support the more common use cases.