Reactor and Stored Procedures

I am in the process of porting over an existing Fusebox 4 appliction to Model-Glue:Unity. I plan on blogging about my experiences, but I wanted to mention an issue I encountered using Reactor and Stored Procedures.

There are certain actions in the application that are controlled by stored procedures. As such, I decided to create a custom save() method on the DAO in question to handle using the stored procedures.

When I tested the changes, I recieved an error about <cftransaction> and how all the transactions needed to have the same username and password. After a bit of searching, I discovered that in the DAO created by Reactor, there is an optional argument to determine whether or not you want all of the 'save' operations to be run in side of <cftransaction>. The default will run the save() operation inside <cftransaction>

Since the stored procedures I am using contain their own SQL transaction clauses, I decided to forego the Reactor <cftransaction> and used object.save(false). This worked like a charm.

For the record, this may be in the documentation, but at the time I was trying to troubleshoot this issue, I did not have access to it.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Brian Rinaldi's Gravatar I can see you added cftransaction's to the post by looking at the source, but it isn't showing up in the text.
# Posted By Brian Rinaldi | 6/23/06 10:32 AM
Scott Stroz's Gravatar Fixed. Thanx Brian!
# Posted By Scott Stroz | 6/23/06 10:35 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9. original design by tri-star web design