Hello there,
This is general question regarding how transactions work in SC. I'm currently working with project where we need (or at least we think we need ;) global transactions ). I just need to clear some things up in my head for this.
Let's say we have two sql datasouces A and B pointing to different databases.
User starts queue and sends two updates one for A and the other for B. Lets say SC first processes update call to A and then to B. But call to B fails upon committing let's say it happens because server crashes just after commit to A.
1.How transactions work for this scenario.?
2. When I execute above queue scenario but this time A is sql DS and B is hibernate DS via spring managed SessionFactory (not beanless) then (correct me if I'm wrong):
a)there are two different transactions: sql DS uses its own tx handling via local transactions on connection and call to update to B DS uses hibernate/spring configured transaction manager?
3. We want to use JTA transaction manager with XA support to every operation that spans multiple DS-es. Is our only option to use custom operation bindings and delegating everything manually to Spring services? Is there any way we can use built in DS operations mixed with custom DS operations which delegates to stored procedures but both using the same transaction manager?
Example scenario is like this:
1 You have product details DynamicForm bound to A (sql ds) and change some details there before calling saveData on it.
2. When saving changes we want to perform DS add operation on another generic datasource (this is different database). This second add operation is bound in ds.xml file to transactional spring service.
We do this in one queue
Is there any way to do this while reusing SC logic for first operation? I suppose not if this is A is sql type
Would it help to have A ds changed to Hibernate datasource, will SC use spring transaction manager then?
Thanks for help.
You did excellent job with SC, keep up good work.
Łukasz
This is general question regarding how transactions work in SC. I'm currently working with project where we need (or at least we think we need ;) global transactions ). I just need to clear some things up in my head for this.
Let's say we have two sql datasouces A and B pointing to different databases.
User starts queue and sends two updates one for A and the other for B. Lets say SC first processes update call to A and then to B. But call to B fails upon committing let's say it happens because server crashes just after commit to A.
1.How transactions work for this scenario.?
2. When I execute above queue scenario but this time A is sql DS and B is hibernate DS via spring managed SessionFactory (not beanless) then (correct me if I'm wrong):
a)there are two different transactions: sql DS uses its own tx handling via local transactions on connection and call to update to B DS uses hibernate/spring configured transaction manager?
3. We want to use JTA transaction manager with XA support to every operation that spans multiple DS-es. Is our only option to use custom operation bindings and delegating everything manually to Spring services? Is there any way we can use built in DS operations mixed with custom DS operations which delegates to stored procedures but both using the same transaction manager?
Example scenario is like this:
1 You have product details DynamicForm bound to A (sql ds) and change some details there before calling saveData on it.
2. When saving changes we want to perform DS add operation on another generic datasource (this is different database). This second add operation is bound in ds.xml file to transactional spring service.
We do this in one queue
Is there any way to do this while reusing SC logic for first operation? I suppose not if this is A is sql type
Would it help to have A ds changed to Hibernate datasource, will SC use spring transaction manager then?
Thanks for help.
You did excellent job with SC, keep up good work.
Łukasz
Comment