Another suggestion to add to the discussion: You could cache the first 2 components in the Application scope, then pass them by reference to the init() method of your session cached object when you create it. Thus, you can save yourself the overhead of instantiating the other components when you create a new session. In you init() method simply use the Arguments scope to refer to the methods in the first 2 components you need.
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Dawson, Michael > Sent: Tuesday, August 12, 2003 2:24 PM > To: [EMAIL PROTECTED] > Subject: [CFCDev] Session-Based CFC Instances that Include other CFC > Instances > > > I am finally starting to put together all the pieces of my application. > > I have three components: > 1. ActiveDirectoryService.cfc (utility) > 2. UserService.cfc (utility; uses some methods from 1) > 3. AceLinkUser.cfc (session-based; stores current user's data; uses some > methods from both 1 and 2) > > My AceLinkUser component will be the only component that is stored in > the user's session scope. This component consumes methods from the > other two component instances ONLY during the Init() method. > > I don't plan on calling the "sub-instances" in any of the AceLinkUser's > methods. If I need to get quick information about someone who is NOT > the current user, in other words not the user stored in the session > scope, I'll just use the UserService component directly. > > My question is, will I have any problems with those "other" instances > "hanging" around in my session-based scope? I assume any instances I > have created in my AceLinkUser instance will also be stored in the > session scope as well? > > Not that that page-context bug is an issue anymore, but I don't output > from the components listed above. > > Thanks> ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
