Single TransactionTemplate to perform variations of transaction configurations [SPR-17491] #22023
Comments
Tadaya Tsuyukubo commented Thinking a bit more, TransactionTemplate may not be a good place to add since it is a stateful for transaction definitions.
So, maybe something like: public class SimpleTransactionTemplate {
// with default
public <T> T execute(TransactionCallback<T> action) throws TransactionException {
...
}
public <T> T execute(TransactionDefinition definition, TransactionCallback<T> action) throws TransactionException {
...
}
}
If API looks ok, then I can write a PR for this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tadaya Tsuyukubo opened SPR-17491 and commented
With TransactionTemplate, for example, setReadOnly(true) is called, all executions with this template becomes readOnly transactions. If I want to perform another transaction with non-readonly, I need to create another template and so for all variation of transactions.
Instead, It would be nice to perform various transaction configurations with single TransactionTemplate.
For example:
No further details from SPR-17491
The text was updated successfully, but these errors were encountered: