All of my database processing is done through CFCs.  Basically, I have an
action.cfm page where I invoke a series of CFCs and call specific functions
of those CFCs.  I tried wrapping <cftransaction> around function calls in my
action.cfm page thinking it would roll back any changes made in the called
CFCs.  But that is not the case.

If I moved the <cftransaction> down inside of CFC, then that does me no good
because it has no control over subsequent CFC calls.  So, from my
perspective, cftransaction is useless.

Thanks
 
Tom Schreck
972-361-9943

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 15, 2004 3:23 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] cftransaction

> I'm having an issue with <cftransaction> working as I think 
> it should.  In my action page, I wrap a series of CFC 
> invocations and method calls inside a <cftransaction> in the 
> hope that if a method fails then all will be rolled back.  
> This is not happening.  The processing that occurs prior to 
> the failure is not being rolled back.  Does anyone have 
> insight to this issue please?

The CFTRANSACTION tag only affects database interaction using the same
database connection. It doesn't affect what happens with CF code,
specifically. So, unless your CFC invocations and method calls do nothing
but database interaction, CFTRANSACTION will not roll their changes back.

In addition, there have been some known issues with using CFTRANSACTION to
roll back database changes made using CFCs. I don't know if they've all been
resolved. I would generally recommend that you perform transactional logic
within the database rather than within CF if possible.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
[EMAIL PROTECTED]

Reply via email to