cancel
Showing results for 
Search instead for 
Did you mean: 

Spring, Transaction Manager and Data Source

mchaia
Champ in-the-making
Champ in-the-making
Hi all,
We're planning to introduce Activiti in our solution as a workflow engine.
I just don't get why is it necessary to pass to the SpringProcessEngineConfiguration both the data source AND the transaction manager. It seems like a some kind of redundancy to me. What am I missing?
The trx mgr should be enough since it has injected the data source, doesn't it?

Thanks in advance and great job, you people from Alfresco!!
Martin
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Spring's PlatormTransactionManager interface doesn't expose "getDatasource", so you can't get it from there (even though all implementations of it know the dataSource internally)… That's why you need to pass them both, since activiti needs to get hold of connections and control the springtransaction

mchaia
Champ in-the-making
Champ in-the-making
Oh, I see…
Thanks for your quick answer.
Martin