I just find it interesting when it is mentioned for things like DB inserts when the docs even note it is not necessary for most database systems.  Also even notes to not use it on business logic or queries.

On 3/16/06, Cody Caughlan <[EMAIL PROTECTED]> wrote:
Ung: if you are going down the cflock route, then wouldnt you need to place a cflock around all cftransaction tags (action = "" "rollback", "commit")??. I am not so sure the cflock is necessary. I think CF is smart enough to make the cftransaction threadsafe, as a matter of fact you are guaranteed that if you are doing your cftransaction stuff within a CFC method..right? I think cflock is not necessary, an overkill and performance prohibitive. But please correct me if I am wrong!
 
/cody


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Aaron Rouse
Sent: Thursday, March 16, 2006 12:30 PM
To: [email protected]
Subject: Re: [CFCDev] CFCs DB Transactions

 
how does CFLock help with database transactions?

On 3/16/06, Ung, Seng <[EMAIL PROTECTED] > wrote:
cody:
I used cflock within the commit

-----Original Message-----
From: Cody Caughlan [mailto: [EMAIL PROTECTED]]
Sent: Thursday, March 16, 2006 12:04 PM
To: [email protected]
Subject: RE: [CFCDev] CFCs DB Transactions


Since you cannot nest transactions you have wrap 1 in an outer layer and
then call all your CFCs. I think the best way to do this is inside a
try/catch block. E.g.

<cftransaction action=""

  <cftry>
    <cfset doSomeDBStuff() />
    <cfset doMoreDBStuff() />
    <cfset doMasdBStuff() />

    <!--- if you got here, then all is good. Go ahead and commit DB
transction --->
    <cftransaction action="" />

   <cfcatch>
      <cftransaction action="" />
      <cfrethrow /> <!--- or whatever --->
  </cfcatch>

</cftry>

</cftransaction>

This is what I do and it has proved to be a good approach. If someone has
another approach I would be interested in hearing about it!

/Cody

-----Original Message-----
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf
Of Michael T. Tangorre
Sent: Thursday, March 16, 2006 11:26 AM
To: [email protected]
Subject: [CFCDev] CFCs DB Transactions

I have seen this issue pop up from time to time on this list and thought I
would inquire as to how people are handling this...

What are some of the options when it comes to using transactions,
committing, and rolling back when the pieces of the transaction come from a
variety of CFCs?

Thanks,

Tango.




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting
( www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]





--
Aaron Rouse
http://www.happyhacker.com/ ----------------------------------------------------------

You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]



--
Aaron Rouse
http://www.happyhacker.com/ ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to