Yes, you cannot nest cftransaction tags - but there is a workaround this. You just need to create your own controller regarding who is going to do cftransaction (is it me or the other function?).
It all depends on your situation, but usually CFCs that wrap internal CFC (while themselves they are exposed) should not do directly any DB operations. This implies you may even not need a controller for the function that needs to do cftransaction. A controller can be just a function input variable (easy case) or more complex logic (I seen people do recursive functions and use this scope for cftransaction control). And on final note, it would be just nice to nest cftransactions, I think it was on CF7 wish list and I bet it is now on CF8 wish list. TK http://www.tomkitta.com -----Original Message----- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 19, 2005 11:53 AM To: CF-Talk Subject: REPOST: Re: CFCs, webservices and CFTRANSACTION No takers? Aw 'cmon...somebody must have an opinion (I always do...hehe) TIA Cheers Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ----- Original Message ----- From: "Bryan Stevenson" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Tuesday, October 18, 2005 9:39 AM Subject: CFCs, webservices and CFTRANSACTION > Hey All, > > The setup: > I have webservices that are essentially wrappers for internal CFCs. They > perform some added valoidation, but essentially pass arguments through to > internal CFCs. They often call multiple internal CFCs which each have a > CFTRANSACTION block. > > The problem: > I really need ALL the methods called by the webservices to either to > commit the data they are attempting to or all data changes across all > methods called by a webservices should be rolled back. Of course as we > know you cannot nest CFTRANSACTION blocks. > > So whatya think I should do? > > I did think of removing the CFTRANSACTION blocks from the internal CFCs, > but that doesn't seem right.....then developers would have to know to wrap > calls to the methods in those CFCs with CFTRANSACTION....and that flys in > the face of the "black box" characteristics of CFCs....all you should need > to know about them is their name and the arguments and associated data > types (it would also mean webservice consumers could skip the > CFTRANSACTION step and screw my data). > > TIA > > Cheers > > Bryan Stevenson B.Comm. > VP & Director of E-Commerce Development > Electric Edge Systems Group Inc. > phone: 250.480.0642 > fax: 250.480.1264 > cell: 250.920.8830 > e-mail: [EMAIL PROTECTED] > web: www.electricedgesystems.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221507 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

