for a while I've been trying to work out what's actually happening
within CFTransaction. if anyone knows for definite, I'm all ears.

the best I've come up with is that it uses only one db connection (it
has to: otherwise you couldn't do "serialzable"). What I suspect is
that it throws the SQL at the database but holds the commit command
until the </cftransaction> is run and the rollback isn't triggered (or
the commit is explicitly called).

so it's likely that all SQL within the body of the <cftransaction />
tag is held in an uncommitted state and none of it - logging calls in
another cfquery block within included - will be committed if rollback
occurs.


I can see what you're getting at: ensuring the log details refers
directly to that transaction taking place, whether it succeeds or
fails.

apart from suggesting a trigger/doing the logging on the db side, the
only other thing I can think of (in the 30 seconds of though I've
given it) is give up on the transaction for the logs and just collect
enough info within the transaction (inc a success/fail flag) to do a
log entry straight after?









On Mon, Jul 7, 2008 at 11:27 AM, Chris Velevitch
<[EMAIL PROTECTED]> wrote:
>
> How do you do application logging into the same database inside a
> transaction that might get rolled back?
>
> --
> Chris
> --
> Chris Velevitch
> Manager - Adobe Platform Users Group, Sydney
> m: 0415 469 095
> www.apugs.org.au
>
> Adobe Platform Users Group, Sydney
> July meeting: Taming The Code
> Date: Mon 28th July 6pm for 6:30 start
> Details to follow.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to