You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I am running the latest version
I checked the documentation and found no answer
I checked to make sure that this issue has not already been filed
Expected Behavior
In spring boot app when i have auto-commit for db turned off.
I submit one time task.
task is saved in db and later executed per schedule.
Current Behavior
In spring boot app when i have auto-commit for db turned off.
I submit one time task.
task is not saved in db and later executed per schedule.
Reason is auto-commit is off and commitWhenAutocommitDisabled cannot be changed per any config prop but one has to create new Scheduler bean.
Context
DB-Scheduler Version :
Java Version : 17
Spring Boot (check for Yes) : - [x]
Database and Version : postgresql 11
So i have prepared PR that address this feature enhancement, please let me know if it is something that make sense to you or not, or i am missing something. Thank you in advance.
If we enable this property for Spring Boot, and app is using Spring transactions, any calls using the SchedulerClient (such as schedule a one-time task) will result in the larger transaction getting committed. Any subsequent RuntimeException from within the transaction will not result in a full rollback as would normally happen. So this is a bit dangerous.
How are you committing other jdbc-interactions?
If you would wrap the call to the scheduler.schedule(<onetime-task ...>); in a Spring transaction, I think things would work as expected.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Expected Behavior
In spring boot app when i have auto-commit for db turned off.
I submit one time task.
task is saved in db and later executed per schedule.
Current Behavior
In spring boot app when i have auto-commit for db turned off.
I submit one time task.
task is not saved in db and later executed per schedule.
Reason is auto-commit is off and commitWhenAutocommitDisabled cannot be changed per any config prop but one has to create new Scheduler bean.
Context
So i have prepared PR that address this feature enhancement, please let me know if it is something that make sense to you or not, or i am missing something. Thank you in advance.
#350
The text was updated successfully, but these errors were encountered: