I'm trying to extend cftransaction to automatically retry the
transaction if a deadlock occurs. I basically what to be able to say:-

     <cf_transaction retrycount="5">
            ...
     </cf_transaction>

When I use paired custom tags (see below), I get errors saying I need a
closing cftry or cfcatch tags.

     <cfif thisTag.ExecutionMode IS "start">
          <cfset lvCount=0>
          <cftry>
               <cftransaction action="begin" />
     <cfelse>
               <cftransaction action="commit" />
               <cfcatch type="database">
                    <cftransaction action="rollback" />
                    <cfset lvCount = lvCount+1>
                    <cfif lvCount le #attributes.deadlockcount#>
                         <cfexit method="loop">
                    </cfif>
               </cfcatch>
          </cftry>
     </cfif>

I tried looking for information on how to do it in CFX, but I couldn't
seem to find any information on creating paired CFX tags in Java.

Has anyone done this?

Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226889
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to