user509755
user509755

Reputation: 2991

spring batch transaction manager clarification

we have two diff datasource (one for spring batch and one for biz domain). When we configure spring batch job, where does transaction manager supposed to reference. Is it datasource pointing to spring batch schema or biz schema?

Upvotes: 0

Views: 139

Answers (2)

Luca Basso Ricci
Luca Basso Ricci

Reputation: 18423

Standard SB transaction manager is the one pointed by bean named transactionManager.
If you have more than one transaction manager in your spring config, you'll need to specify the name of the bean you want to use.
If you have more than one datasource, one for SB metadata tables and one for processed data, you need distribuited transaction.

Upvotes: 1

luboskrnac
luboskrnac

Reputation: 24591

I would say you should use same transaction manager for your data and meta-data, so that they are consistent.

Upvotes: 1

Related Questions