cancel
Showing results for 
Search instead for 
Did you mean: 

Spring Integration - Remoting

tvanhoec
Champ in-the-making
Champ in-the-making
Hi everyone,

We are currently having a transaction issue when we use spring remoting inside our application.

We used to do this remote calls using HTTP invocation, but this kind of invocation does not work with transactions. As soon as we execute  this (HTTP)remote call, we lose our existing transaction, this way a single complete rollback becomes impossible.

To solve this problem we are looking for solutions.
Using EJB invocation would solve the transaction problems, but that will also have a significant impact on the existing applications/architecture.
That is why we post this question on the forum , because activiti suggests you should use spring integration; but does anyone have a best practice idea about combining remoting with the activiti way of life?

Thanks in advance
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
It will all depend on the transactional capabilities of the external service you are calling.
If you are using JMS for example, you could configure Spring transactions in such a way that it will share the same transaction (eg JTA).

Another solution could be to 'model' catching exceptions when calling the remote service, and handling the flow yourself in your process (or simply throw a RuntimException that will rollback the Activiti process).