You've hit it pretty much on the head.

As an example let's say you call the "Delete" method of a CFC and that CFC,
in turn, calls the "delete" method for two linked children.

It would be nice (I think) to abstract the DB transaction into the CFCs (or
into persistence components called by them or whatever - but away from the
implementation interface) but that's not as easy as it sounds at first
glance.

It's not really so much about using them in the same page - you can have a
beginning transaction one CFC and an ending in another - this seems to be
dealt with at the request level.  Rather it's about starting one in a method
in an instance of component then called the same method on a different
instance (as in the example above) as would be done during recursive calls.

At least that was my issue.  I've since "solved" it such that it works but I
hate the implementation.  I'd love to find an elegant way to deal with this.

Jim Davis

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Dave Watts
> Sent: Sunday, December 07, 2003 6:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [CFCDev] cftransaction with CFC's
> 
> > > Yeah, I'm quite put out by the whole thing. It seems very
> > > strange to me that CF took a step back from every DMBS I've
> > > ever used, by making transaction control statements depend
> > > on eachother, rather than being standalone commands. I
> > > suppose the tag-based nature of the language demanded it,
> > > but then to go against that nature and allow standalone tags,
> > > but only within an existing open/close tag pair seems really
> > > f***ed up. One or the other, ya know?
> >
> > I'm coming into this thread rather late, but if you're
> > talking about the use
> > of nested CFTRANSACTION tags, it's my understanding that you
> > aren't supposed
> > to have "standalone" CFTRANSACTION tags in any case - each
> > CFTRANSACTION tag
> > should always have a closing CFTRANSACTION tag:
> >
> > <cftransaction isolation="serializable">
> >
> >     ... Some queries ...
> >
> >     <cftransaction action="commit"/> <!--- note the closing
> > slash --->
> >
> >     ... Some more queries ...
> >
> > </cftransaction>
> 
> OK, now I've read the whole thread. I think that the underlying issue is
> that you can't separate CFTRANSACTION tags, so the opening and closing
> tags
> always have to be within the same page. That's always been the case, and I
> don't expect that's changed any with CFMX 6.x. So, separating
> transactional
> logic within different CFC methods (which, after all, get compiled into
> separate Java classes) seems problematic to say the least.
> 
> I apologize if this isn't directly on point, since I read through the
> thread
> pretty quickly.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
> 
> ----------------------------------------------------------
> 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