At 02:14 PM 9/14/2004, you wrote:
>Each instance will be independant, but the instance (and all it's
>instance variables) are still session-scoped variables, and therefore
>need to be locked appropriately.
>
>On a different note, you generally don't want CFCs to interact with
>any external scopes (such as session).  Usually better to have the
>method just return a value and then the calling code can store it
>wherever (such as in a shared scope).  That'll help keep down on weird
>dependancies as time goes on.


Yes. The CFC in the application scope as actually a facade for the session scope, 
names SessionManager.

SessionManager uses createObject() to create a new User object and store it in the 
session scope.


The problem here is that instance data from a User object in one session can overwrite 
instance data in another session's User object!  As part of the User object's 
creation, I assign it a unique ID. Both sessions output the correct unique IDs for 
their respective User objects, but some instance data gets overwritten sessions.

Any ideas?

--
Alex 

----------------------------------------------------------
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]

Reply via email to