On Friday, Feb 28, 2003, at 07:21 US/Pacific, Gyrus wrote:
> Obviously the advantage of CFC's is that I can updateUser() or 
> whatever, and
> have that method call the updatePerson() method if necessary. Can this 
> not
> be done?

Yes. user.cfc's updateUser() method can call person.cfc's 
updatePerson() method since updatePerson() is inherited into user.cfc 
instances.

> This obviously impacts on the use of CFTRANSACTION - I've seen a few
> mentions of problems with this. Can a transaction not span multiple 
> CFC's?

A cftransaction can only enclose inline code, not any functions called 
inside that code:

        <cftransaction>
                ... bunch of code with no function calls ...
        </cftransaction>

That will work just fine. The following will not:

        <cftransaction>
                ... some code ...
                callAnotherDatabaseMethod()
                ... more code ...
        </cftransaction>

Any database activity in callAnotherdatabaseMethod() would not be 
rolled back if you tried to rollback the cftransaction shown above.

That would impact you if your updatePerson() method did database stuff 
*and* your updateUser() method did additional stuff and you wanted to 
commit / rollback the combination of actions across both methods.

This seems to be bug #49953 and my guess is that you won't see a fix 
for this for quite a while (but I'm willing to be corrected by Phil or 
Debbie or...!).

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim/iChat: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.macromedia.com/go/arch_blog

Announcing Macromedia DevNet Subscriptions
Maximize your power with our new premium software subscription
Find out more: http://www.macromedia.com/go/devnetsubs

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to