Definitely I would either just pass the entire user object in or use a 
session facade to instantiate the user ubject from within the server 
scoped CFC.  The primary reason I would choose one over the other would 
be that explicitly passing in the user object would allow you to 
potentially pass in ANY user object (logged in user or not), while using 
a session facade pretty much will tightly couple that server scope CFC 
to the logged in user and you will have to refactor to allow it to 
support other user objects.

-Cameron

Robertson-Ravo, Neil (RX) wrote:
> I would, if at all possible for designs sake pass in the session data as an 
> argument and to not use / explicitly reference the session scope within.
>   
> -----Original Message-----
> From: John Skrotzki
> To: CF-Talk
> Sent: Fri Jul 20 22:45:39 2007
> Subject: CFC is server scope and session calls to it...
>
> Hi!  Question, I have several cfc's stored in server scope ( yes, I own 
> server and it is for a intranet and I use vars ) that are the "guts" of my 
> app.  I have a pretty clear understanding of how things work except one 
> situation.  
>
> When a call is made to a method with arguments passed in, currently I am 
> passing in my session.user.ident ( where I store the user identity ) 
> explicitly.  I was wondering if I am able to reference the session scope 
> implicitly in the cfc method directly without causing erroneous user.idents 
> references.  I would assume that I would have to do a lock?  What kind?  Or 
> is it better to pass in the session directly into the cfc method using the 
> arguments?  Am I making sense? lol
>
> Thanks.
>   


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284273
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to