how using transaction?

leprado's picture
Hi, My service (WSAS) need to call 2 methods of DataServices (CadastrarPessoa and CadastrarTelefonePessoa) Sample: the method CadastrarPessoa was successfull but the method CadastrarTelefonePessoa an error occurred how to use the transaction to call the methods (commit and roolback)?? My code in attachments Thank you Leandro Prado
AttachmentSize
Transaction.txt78.64 KB
sumedha's picture

Hi Leandro, First let me

Hi Leandro, First let me verify if I understood your question first. You have a Data Service (ServiceX) & in this ServiceX, you have two operations (addOrder & addOrderDetails). And you want these two operations to work on a single transaction. In other words, you first call addOrder() & then addOrderDetails(). If addOrderDetails() fails, you want to rollback changes done via addOrder() as well. /sumedha
leprado's picture

Yes!!! perfect!!! how do

Yes!!! perfect!!! how do using transaction in DataServices?
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)