You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jonathon -- Improov <jo...@improov.com> on 2007/04/04 06:00:12 UTC

Running services in single transaction, via ECA or plain runSync

Si Chen,

I found this: http://www.nabble.com/forum/ViewPost.jtp?post=6158405&framed=y .

 > The subtle issue is then should all the service calls be wrapped in one big
 > transaction, so all the rows fail and succeed together?  For example, if you
 > use service-multi to create several products, and one of the products failed,
 > should the others succeed?

Yes and no. If the set of products being created are independent of each other, then any failed 
creations should not stop other products from being successfully created. Else if the set of 
products are somehow dependent on each other, you'd want the entire thing run as a single transaction.

Questions from me:

Which method should I use to run multiple services inside a single transaction? ECA or plain runSync?

Say I attach service B to service A via ECA. Does ECA allow service B to be run in the same 
transaction as service A?

Can service B receive a set of parameters not inside service A? This question has been asked to 
Jacopo before, and subsequently answered by myself. The answer is no. But I'm wondering if OFBiz 
has been enhanced/tweaked to make the answer a yes?

Jonathon