Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify JobRepository Isolation Level with @EnableBatchProcessing

I am creating a Spring Batch application using Java annotations. I have the @EnableBatchProcessing annotation, so I haven't explicitly defined a JobRepository or JobRepositoryFactory. This was working fine until today, when I started getting the "ORA-08177: can't serialize access for this transaction" error.

How can I change the isolation level on a JobRepository I don't create or interact with?

like image 429
cneff Avatar asked May 17 '26 20:05

cneff


1 Answers

"How can I change the isolation level on a JobRepository I don't create or interact with?" In short, you don't. You need to create it yourself by extending the DefaultBatchConfigurer and overriding the createJobRepository method to provide your own customized instance.

like image 196
Michael Minella Avatar answered May 19 '26 08:05

Michael Minella



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!