No I just didnt understand at first, thank you very much. I guess I should of just tracked it down, it's right in front of my eyes

    <cffunction name="save" access="public" hint="I save the record." output="false" returntype="void">
        <cfargument name="useTransaction" hint="I indicate if this save should be executed within a transaction." required="no" type="boolean" default="true" />
       
        <cfif arguments.useTransaction>
            <cfset saveInTransaction() />
        <cfelse>
            <cfset executeSave() />
        </cfif>
       
    </cffunction>   


On 8/1/06, João Fernandes <[EMAIL PROTECTED]> wrote:
Exactly,

Sorry if I wasn't too much explicit.
Turning off transactions on each record will allow you to wrap everything you want inside a transaction tag.

João Fernandes


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Doug Sims
Sent: Tue 01-Aug-06 9:15 PM
To: [email protected]
Subject: Re: [Reactor for CF] nested transaction error

I think João was saying you can just disable transactions in reactor
to handle it yourself and avoid nesting the un-nestable

On 8/1/06, Dan Vega < [EMAIL PROTECTED]> wrote:
> but if object 1 has errors objects 2-5 are still being saved?
>
>
> On 8/1/06, João Fernandes < [EMAIL PROTECTED] > wrote:
> >
> > Reactor records already use transactions but you can turn it off using
> myRecord.save(false)
> >
> > João Fernandes
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] on behalf of Dan Vega
> > Sent: Tue 01-Aug-06 8:55 PM
> > To: reactor
> > Subject: [Reactor for CF] nested transaction error
> >
> > Does anyone know how I can perform transactions and still use reactor? I
> > have the following
> >
> > <!--- if form is submitted --->
> >
> > <!--- object 1 --->
> > set all fields
> > validate
> > save
> >
> > <!-- object 2 --->
> > set fields
> > validate
> > save
> >
> > And so on for another 4 or 5 objects.
> >
> > But around this whole thing I want to wrap transaction tags and if
> > ErrorCollection.hasErrors() I want to back out of the transaction. I have
> > tried to wrap but it seems another method uses the transaction tag
> >
> > The following information is meant for the website developer for debugging
> > purposes.    Error Occurred While Processing Request      Nested
> > transactions are not supported.    You cannot nest a cftransaction tag
> > within another cftransaction tag. Check for a cftransaction tag on the
> page
> > that called the CFC.       The error occurred in *C:\Program Files\Apache
> > Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:
> line 101*
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:
> line 92
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm: line
> 27
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:
> > line 15
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:
> > line 13
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:
> > line 1
> > *Called from* C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\Application.cfc:
> > line 25
> >
> > 99 :    <!--- saveInTransaction --->
> > 100 :   <cffunction name="saveInTransaction" access="private" hint="I
> > save the record in a transaction." output="false" returntype="void">
> > *101 :          <cftransaction>*
> > 102 :                   <cfset executeSave() />
> > 103 :           </cftransaction>
> >
> >   ------------------------------
> >      Resources:
> >
> >    - Check the ColdFusion
> >
> documentation<http://www.macromedia.com/go/proddoc_getdoc >to
> verify
> > that you are using the correct syntax.
> >    - Search the Knowledge
> > Base< http://www.macromedia.com/support/coldfusion/ >to
> find a solution
> > to your problem.
> >
> >      Browser   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5)
> > Gecko/20060719 Firefox/1.5.0.5  Remote Address   127.0.0.1  Referrer
> > http://localhost/appname/staff/editAdvisor.cfm  Date/Time
>   01-Aug-06 04:01
> > PM     Stack Trace   at
> >
> cfabstractRecord2ecfc1906471027$funcSAVEINTRANSACTION.runFunction(C:\Program
> > Files\Apache
> Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:101)
> at
> >
> cfabstractRecord2ecfc1906471027$funcSAVE.runFunction(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:92)
> at
> > cfeditAdvisor2ecfm1418557142._factor0(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:27) at
> > cfeditAdvisor2ecfm1418557142._factor3(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appnamestaff\editAdvisor.cfm:15) at
> > cfeditAdvisor2ecfm1418557142._factor10(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:13) at
> > cfeditAdvisor2ecfm1418557142.runPage (C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:1) at
> >
> cfApplication2ecfc1169789817$funcONREQUEST.runFunction(C:\Program
> > Files\Apache
> Group\Apache2\htdocs\appname\staff\Application.cfc:25)
> >
> >
> coldfusion.tagext.sql.TransactionTag$NestedTransactionInCFCException:
> > Nested transactions are not supported.
> >         at
> coldfusion.tagext.sql.TransactionTag.doStartTag(TransactionTag.java:164)
> >         at
> cfabstractRecord2ecfc1906471027$funcSAVEINTRANSACTION.runFunction(C:\Program
> > Files\Apache
> Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:101)
> >         at
> coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:348)
> >         at
> coldfusion.filter.SilentFilter.invoke (SilentFilter.java:47)
> >         at
> coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:294)
> >         at
> coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke( UDFMethod.java:258)
> >         at coldfusion.filter.FunctionAccessFilter.invoke
> (FunctionAccessFilter.java:56)
> >         at
> coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:211)
> >         at
> coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:173)
> >         at coldfusion.runtime.CfJspPage._invokeUDF
> (CfJspPage.java:1807)
> >         at
> cfabstractRecord2ecfc1906471027$funcSAVE.runFunction(C:\Program
> > Files\Apache
> Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc:92)
> >         at coldfusion.runtime.UDFMethod.invoke
> (UDFMethod.java:348)
> >         at
> coldfusion.filter.SilentFilter.invoke (SilentFilter.java:47)
> >         at
> coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:294)
> >         at
> coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
> (UDFMethod.java:258)
> >         at
> coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
> >         at
> coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java :211)
> >         at coldfusion.runtime.UDFMethod.invoke
> (UDFMethod.java:173)
> >         at
> coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:192)
> >         at
> coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:145)
> >         at coldfusion.runtime.CfJspPage._invoke
> (CfJspPage.java:1634)
> >         at
> cfeditAdvisor2ecfm1418557142._factor0(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:27)
> >         at
> cfeditAdvisor2ecfm1418557142._factor3(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appnamestaff\editAdvisor.cfm:15)
> >         at
> cfeditAdvisor2ecfm1418557142._factor10(C:\Program
> Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:13)
> >         at cfeditAdvisor2ecfm1418557142.runPage
> (C:\Program Files\Apache
> > Group\Apache2\htdocs\appname\staff\editAdvisor.cfm:1)
> >         at
> coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
> >         at
> coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java
> :349)
> >         at
> coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
> >         at
> cfApplication2ecfc1169789817$funcONREQUEST.runFunction(C:\Program
> > Files\Apache
> Group\Apache2\htdocs\appname\staff\Application.cfc:25)
> >         at
> coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:348)
> >         at
> coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke (UDFMethod.java:294)
> >         at
> coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
> (UDFMethod.java:258)
> >         at
> coldfusion.filter.FunctionAccessFilter.invoke( FunctionAccessFilter.java:56)
> >         at
> coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:211)
> >         at coldfusion.runtime.UDFMethod.invoke
> (UDFMethod.java:173)
> >         at
> coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:192)
> >         at
> coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:145)
> >         at coldfusion.runtime.AppEventInvoker.invoke
> (AppEventInvoker.java:54)
> >         at
> coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:115)
> >         at
> coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java :200)
> >         at coldfusion.filter.RequestMonitorFilter.invoke
> (RequestMonitorFilter.java:51)
> >         at
> coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
> >         at
> coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
> >         at coldfusion.filter.ExceptionFilter.invoke
> (ExceptionFilter.java:69)
> >         at
> coldfusion.filter.BrowserDebugFilter.invoke (BrowserDebugFilter.java:52)
> >         at
> coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
> >         at
> coldfusion.filter.BrowserFilter.invoke (BrowserFilter.java:38)
> >         at
> coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
> >         at
> coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java
> :22)
> >         at
> coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
> >         at coldfusion.CfmServlet.service(CfmServlet.java:107)
> >         at coldfusion.bootstrap.BootstrapServlet.service
> (BootstrapServlet.java:78)
> >         at
> jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> >         at
> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java :42)
> >         at jrun.servlet.JRunRequestDispatcher.invoke
> (JRunRequestDispatcher.java:257)
> >         at
> jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> >         at
> jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
> >         at
> jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
> >         at
> jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> >
> >
> >
> > --
> > Dan Vega
> > [EMAIL PROTECTED]
> >
> >
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> > Reactor for ColdFusion Mailing List
> > [email protected]
> > Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> >
> >
> >
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> > Reactor for ColdFusion Mailing List
> > [email protected]
> > Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> >
> >
>
>
>
> --
> Dan Vega
>  [EMAIL PROTECTED]
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to