Elliot,
Can't you simply use named transactions to accomplish your goal of splitting
across templates?
template1.cfm (or cfc or whatnot)
--------------
<cfquery datasource="...">
BEGIN TRAN tran1
</cfquery>
template2.cfm (or cfc or whatnot)
--------------
<cfquery datasource="...">
COMMIT TRAN tran1
</cfquery>
test.cfm
--------------
<cfmodule template="template1.cfm">
<cfquery datasource="...">
SELECT 1
</cfquery>
<cfmodule template="template2.cfm">
That should work fine. That said, while it may be possible, I wouldn't
recommend it. A conceptual transaction should probably always be in a
single template/function even if all that that template/function does is
provide the wrapper for the transaction.
Roland
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Elliot Russo
Sent: Tuesday, July 20, 2004 9:14 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] another cftransaction Q: locking db tables?
My particular beef is that <cftransaction> must be opened and closed in the
same template - so while I might try to encapsulate various database actions
I cannot nest transactions tags (and have them automatically collapse into
a single transaction like they do when I use stored procs that nest
transactions in SQL Server).
I am trying to work out how I might use the underlying Java classes to have
a little more control without having to use stored procs which just add to
maintenance hassles
Elliot
----------------------------------------------------------
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]