1. We're using Oracle 9i
2. An array of Order VOs
3. Output to XML file is last step after all updates are completed
successfully
4. Business requirement, easier to track if process is all or nothing
5. DB schema has status/history tables that reflect order state

I modified my setup last night with cftransaction encasing the entire
process and kicked off a whack of batches while I created failure
scenarios at different points in the process. All db transactions rolled
back as expected :)

Got to love CF, took me about 20 mins to refactor everything.

Cheers,
Stace

-----Original Message-----
From: Joseph Flanigan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 16, 2004 11:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Handling Transactions

Stace:

When I read your note it  prompted me with many questions. In your case,

using cftransaction would appear risky for data integrity.

What database are you using? What form is the whack of orders? A flat 
file?  What kind of batch file? Are the orders in a batch file prior to
the 
updates or are you keeping the results of the the update in a batch
file. 
What is the reason for rolling back all order updates if one order
update 
fails? Does the database schema incorporate order update tracking
feature? 
Does the update include read-after-write queries to verify the update?

I would not trust cftransaction to roll back a long update process.
Begin 
by looking at the transaction techniques recommended with the 
DBMS.  CFtransaction will be constrained by the capacities of the
database.

Joseph

At 07:11 PM 7/16/2004, you wrote:

>Hi All,
>
>I've been sifting thru the archives for some material on transactions
>and CFCs (and found some). Just not sure how to apply it in a
particular
>case.
>
>I've got a batch process that runs nightly on one system. It loads a
>whack of orders in a particular state, constructs a batch file while
>updating the status of each order. I'd like to safeguard the process so
>that if there's a failure at any point, ALL db transactions are rolled
>back. Will that actually happen if I'm feeding multiple calls thru my
>DAO?
>
>Batch Service <transaction>(loop over x orders)</transaction>
>-> Order Manager -> Order DAO
>
>So if it's on order 15 for instance and an exception is thrown and I
>rollback from the batch service...will it actually rollback every db
>transaction performed in the lower extremities? Hope that made sense.
>
>Thanks!
>Stace
>
>
>
><table width=800 cellpadding=4 cellspacing=10 border=0><tr 
>bgcolor=BDBDBD><td valign=top width=400><font face=verdana size=2 
>color=FFFFFF><b>AVIS IMPORTANT</b></font></td><td valign=top 
>width=400><font face=verdana size=2 
>color=FFFFFF><b>WARNING</b></font></td></tr><tr><td valign=top 
>width=400><p align=justify><font face=verdana size=1 color=808080> Les 
>informations contenues dans le present document et ses pieces jointes
sont 
>strictement confidentielles et reservees a l'usage de la (des)
personne(s) 
>a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise
que 
>toute divulgation, distribution, copie, ou autre utilisation de ces 
>informations est strictement prohibee. Si vous avez recu ce document
par 
>erreur, veuillez s'il vous plait communiquer immediatement avec 
>l'expediteur et detruire ce document sans en faire de copie sous
quelque 
>forme.</td><td valign=top width=400><p align=justify><font face=verdana

>size=1 color=808080> The information contained in this document and 
>attachments is confidential and intended only for the person(s) named 
>above. If you are not the intended recipient you are hereby notified
that 
>any disclosure, copying, distribution, or any other use of the
information 
>is strictly prohibited. If you have received this document by mistake, 
>please notify the sender immediately and destroy this document and 
>attachments without making any copy of any kind.</td></tr></table>
>
>----------------------------------------------------------
>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 
>www.mail-archive.com/[EMAIL PROTECTED]

-----------------------------------------------------------------------
http://www.switch-box.org/CFSQLTool/Download/

Switch_box                      MediaFirm, Inc.
www.Switch-box.org              Loveland, CO  USA

----------------------------------------------------------
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
www.mail-archive.com/[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 www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to