On 11/3/07, Mike Kear <[EMAIL PROTECTED]> wrote: > Wait a minute! How can the UserService return the session.cached userbean, > if it's not passed into it?
The user service manages the session cached user beans - that's part of its job. > Once again, I thought it was a general rule-of-thumb that you never ask a > CFC to access a shared scope. That if a CFC needs to know something (in > this case the session.userbean) it's passed in. It's a guideline, not a rule. There are perfectly valid scenarios where a service-style component interacts with a shared scope and this is exactly that. The user service encapsulates how the individual user bean is managed so only one method inside the user service actually knows about session scope. > Now if I'm using coldspring to instantiate all CFCs, how do I persuade > ColdSpring to pass the session.userbean into the UserService? You don't. User service manages the user bean in session scope. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood
