Gateway's should be stateless singletons, so you only ever need a
single instance that everything uses concurrently.  Just make sure
you're var-scoping everything correctly or weird bugs will crop up
under load.  You could make application-scope instances, but I prefer
a application-scope factory for getting gateway instances, and letting
that factory deal with the caching.

And by "should", I mean there's rarely a reason not to do it that way,
while there are some nice benefits, particularly eliminating the need
to instantiate more than one instance.

cheers,
barneyb

On 8/23/05, Nando <[EMAIL PROTECTED]> wrote:
>  
> I've found it best to keep them separate. Functionally they tend to sit in
> different areas within a model. That allows me to cache my gateways in a
> manager for front end operations for instance, or keep them lightweight and
> nimble for rapid instantiation.
>  
>  

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.


----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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


Reply via email to