cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Schema Deployment Options

jpeters
Champ in-the-making
Champ in-the-making
Hi,

I have a n00b question that doesn't seem to be answered anywhere directly (please feel free to link me to an existing resource that I may have missed).

Does it matter whether Activiti and my Spring/Hibernate application share the same data source (i.e. specific host+port+db)? I'm thinking along the lines of transaction management here; I read the user guide and it seems Activiti will join an existing Spring transaction if supplied a transaction manager, but are there possible scenarios where it might be acceptable for an Activiti service method to fail but *not* cause a rollback in in the transaction in which the application's service method may be involved (or vice versa)?

And as a follow up, if for some reason I did not wish to use the same data source and instead provide Activiti with its own data source would that necessitate the use of a transaction manager capable of supporting distributed transactions?

Thanks so much,

-jpeters
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Your analysis is correct. Activiti doesn't do anything specific when it comes to transactions, but if you decide to use multiple datasources in your application, your transaction manager will need to be able to do two phase commit transactions (as is usual). When you put the Activiti tables together with your application tables, a simple transaction manager suffices.