Hi Oliver,

Agreed, that this problem can be averted by using proper service design.

However, in some instances we need to be able to expose fine grained
APIs - I am trying to understand what is the best current practice of
dealing with that situation.

Cheers
rouble

On Mon, Feb 6, 2012 at 4:57 PM, Oliver Wulff <[email protected]> wrote:
> Hi rouble
>
> I try to avoid to increase the complexity of my web services based 
> integration whereever possible. I don't want to manage the transaction 
> context within web service consumers.
>
> The example you make is a good candidate. You can avoid the situation by a 
> proper service design. Design less fine grained operations and instead define 
> an operation like "transfer x amount of money from acount y to acount z". 
> Deploy your service implementation within tomcat/jee using spring and JTA and 
> JPA and you get ACID. Transaction demarcation is on the server side (scales) 
> and it is ensured that either the transfer is done or not and your DB is in a 
> consistent state.
>
> What do you think?
>
> Thanks
>
>
>
> ------
>
> Oliver Wulff
>
> http://owulff.blogspot.com
> Solution Architect
> Talend Application Integration Division http://www.talend.com
>
> ________________________________________
> Von: [email protected] [[email protected]]&quot; im Auftrag von &quot;rouble 
> [[email protected]]
> Gesendet: Montag, 6. Februar 2012 21:30
> Bis: [email protected]
> Betreff: How do people implement transactions with CXF?
>
> CXF Gurus, and Users,
>
> How are developers implementing SOAP web services that are
> transactional. For instance, if I have a bank web service that does:
> api call: debit savings $10
> api call: credit checkings $10
>
> I need to be able to begin a transaction before the api calls, and
> commit it after. If either one of the apis fails, I need to be able to
> rollback.
>
> I understand there are standards such WS-AtomicTransaction,
> WS-Coordination and such. But how are people implementing these kinds
> of functions in the absence of those standards being implemented in
> CXF?
>
> Obviously, one way would be to re-write the above api calls as one api call:
> api call: transfter savings checkings $10
>
> But that is not always an option depending on the API.
>
> tia,
> rouble

Reply via email to