Thanks for pointing that out Paul -- if you need access to the Request scope
you'll probably need to use a tag like the one you wrote.

I just wanted to point out for those looking to implement it that from a
performance standpoint CF_REINIT is, shall we say, less than optimal.  In my
unscientific tests calling a simple method in a CFC in which I had to run
CF_REINIT both at the top of the request and in the method (per Benoit's
usage instructions) I found that CF_REINIT accounted from 1/2 to 3/4 of the
execution time of the page.  It seems under load this could become a real
problem.

That said, I can't think of any other way to get at the request scope in a
persisted CFC (though, as Sean might point out, it's probably best to
preserve encapsulation and pass any request variables into your CFC rather
than rely make assumptions about the external environment -- but that's a
different story).




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Paul Kenney
> Sent: Wednesday, March 26, 2003 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Page context bug workaround (was RE: [CFCDev] MVCF at
> benorama.com)
>
>
> Aside from affecting the Session/Application scopes, the bug also
> knocks-out
> the Request scope after a period of time.  The tag addresses this issue as
> well.
>
> Paul Kenney
> [EMAIL PROTECTED]
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Nathan Dintenfass
> > Sent: Tuesday, March 25, 2003 11:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Page context bug workaround (was RE: [CFCDev] MVCF at
> > benorama.com)
> >
> >
> > Benoit:
> >
> > Can you explain a bit more about why you need to do that?
> >
> > In my experience, if you store an instance in the session
> > struct, but don't
> > actually refer to session/application vars inside of the component you
> > should not run into the page context bug.  For the components
> > I have used
> > cached in a session, I just private instance variables to hold any
> > persistent data -- that way I preserve encapsulation and
> > never have to work
> > around the page context bug.
> >
> > I'd be curious to know what others are running into, though.
> >
> >  - Nathan
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Behalf Of Benoit Hediard
> > > Sent: Tuesday, March 25, 2003 11:46 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Page context bug workaround (was RE: [CFCDev] MVCF at
> > > benorama.com)
> > >
> > >
> > > The session.currentMember is an instance of
> > > com.mycompany.member.MemberSession CFC.
> > >
> > > In order to wait for a fix of the Page Context bug (...),
> > I'm using a
> > > workaround custom tag called <cf_reinit> that allow me to get
> > > back the page
> > > context in Session CFCs.
> > >
> > > I don't remember where I got this <cf_reinit> custom tag...
> > > I can send it to you off list if you wish.
> > >
> > > Benoit Hediard
> > > www.benorama.com>

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

Reply via email to