You can't do a "body" with a function like you can do with a custom tag, so
I think you're stuck, if you can't abstract out the entire operation.
However, that's definitely the best way to go; no sense in having the same
code more than once if you can help it.
If it's not possible, then set up the lock name as a variable in your CFC,
and then use that variable, if you're not already. Then you're assured that
you're always using the same lock name.
Cheers,
barneyb
> -----Original Message-----
> From: Jamie Jackson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 24, 2004 9:40 AM
> To: CF-Talk
> Subject: Factoring out locking in CFC
>
> Say I've got a CFC with several methods whose operations (e.g.
> <cfexecutes>) need identical named locks, so that none can run
> concurrently. Is there a way to factor out a "locking" method that can
> be used by the other methods, or is this the exclusive domain of
> custom tags?
>
> The only way that I can figure to do it in the context of a CFC is to
> abstract the whole idea of an "operation" into its own method, and
> lock the operation there.
>
> Am I thinking straight?
>
> Thanks,
> Jamie
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Factoring out locking in CFC Jamie Jackson
- RE: Factoring out locking in CFC Barney Boisvert
- RE: Factoring out locking in CFC Hugo Ahlenius