Is propagation type SUPPORTS equivalent to no Transactional decorator?
Closed this issue · 3 comments
ydinari commented
Suppose I have function foo() decorated with @transactional, calling function bar(). Do we get the same behavior if bar is decorated with @transactional({ propagation: Propagation.SUPPORTS }), or not decorated at all?
It seems that way by looking at the logs of start and commit transaction, but I'm not sure this is guaranteed.
odavid commented
Hi @ydinari ,
The answer is yes.
SUPPORTS
means that it supports the current transaction, but will run without transaction if there is no current transaction.
Hope it helps
ydinari commented
Thanks!
Then is there a use case where I need to use Transaction({propagation: Propagation.SUPPORTS})?
odavid commented
Basically I tried to emulate all spring options. I myself, not sure what
would be the use case for that.
…On Thu, 26 Dec 2019 at 17:15 Yuval Dinari ***@***.***> wrote:
Thanks!
Then is there a use case where I need to use Transaction({propagation:
Propagation.SUPPORTS})?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35?email_source=notifications&email_token=AAGSOAJ6KCLO4QYLIYB5OF3Q2TDCVA5CNFSM4J7J4WM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVWHKI#issuecomment-569074601>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGSOALNQFF2G47BJTMYI53Q2TDCVANCNFSM4J7J4WMQ>
.