> That manager ensures that it never creates two copies of a singleton,
> but you still have the problem of duplicate singletons if you somehow
> create duplicate managers.

Not if the manager uses a mechanism like the application or server scope to
store the singleton.  I am playing with this right now for a validation
library.  I have two objects, validator.cfc and validatorSingleton.cfc.  I
never call validator.cfc directly, but instead always call
validatorSingleton.cfc.

This way validatorSingleton.cfc is ultimately responsible for knowing if
validator.cfc has been instantiated or not, and stores it in a persistent
place (application scope in my case) once instantiated.  This way I can call
validatorSingleton in as many places as I'd like without worrying if
validator.cfc has been instantiated once, twice, or not at all.

-Cameron

-----------------
Cameron Childress
Sumo Consulting Inc.
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to