Barry, Thanks that is what I was hopping I could achieve here, I thought it would but wasn't 100% sure on this. Now the article that you posted from macromedia has confused me a little more on the lock down of transactions.
I guess if I do an insert and the select @@identity would be better than two queries, is that correct in that assumption? Which then means I would not have to serialise the transaction, I am guessing? Regards Andrew Scott Technical Consultant NuSphere Pty Ltd Level 2/33 Bank Street South Melbourne, Victoria, 3205 Phone: 03 9686 0485 - Fax: 03 9699 7976 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Beattie Sent: Thursday, 29 July 2004 8:57 AM To: CFAussie Mailing List Subject: [cfaussie] RE: CFTransaction and CFC's Andrew, don't take this as gospal, but yes, they seem to come under the outside methods' transaction <cftrans... > <cfset bOK = myLocalMethod1(params)> <cfloop ..> <cfset bOK = myLocalMethod2(params)> </cfloop> </cftrans> it seems that you can also add in methods from other CFC's PROVIDED: you instanciate the CFC within the outer method <cfset obj = createobject(etc...)> <cftrans... > <cfset bOK = myLocalMethod1(params)> <cfset bOK = obj.myRemoteMethod2(params)> </cftrans> NOTE: if you try to reference an existing object (created elsewhere) within the transaction, you get a "not in local transaction mode" error (or such) I say "don't take this as gospal" because I'd like to see what's happening "under the hood" with CF. if this was Microsoft's ADO then it'd all make sence (you control the connection to the db explicitly) but CF abstracts what the underlying Java is doing and I'm having trouble finding a definitive expaination of how cftransaction actually works with the underlying java. eg: will cftransaction cause only one connection to the db, no matter how many cfquery's you run? doubtful but how do you know? all the MM docs I've read are piss-weak in explaining exactly what's happening. All they give you is a the typical 4GL view as seen from a CF programmers view. woefully inadequate. this is the best (least useless) I've found http://www.macromedia.com/devnet/mx/coldfusion/articles/cftransaction.ht ml hope it helps. any wrong assumptions, please correct me cheers barry.b --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
