TransactionManager.setTransactionTimeout(...) #22299
-
Hi all, is something like: txMgr.setTransactionTimeout(3600); supposed to work or not? I don't get a Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is with |
Beta Was this translation helpful? Give feedback.
-
That timeout sets the default timeout for the current thread. So you need to call that method, start a new TX, do your work, then revert the timeout to clear the thread local state. This is spec required behavior. If #21115 is ever merged it will provide a much nicer API. |
Beta Was this translation helpful? Give feedback.
That timeout sets the default timeout for the current thread. So you need to call that method, start a new TX, do your work, then revert the timeout to clear the thread local state.
This is spec required behavior. If #21115 is ever merged it will provide a much nicer API.