Pretty certain duplicate() will throw an error when one of the application
variables is an object.  Or system used to use the duplicate() up until we
started to put objects in there.

On 3/23/06, Kevin Penny <[EMAIL PROTECTED]> wrote:
>
> I believe the App variable would still be referencing the application
> scope
> - as the set is by reference - not by value
>
> You'd have to do a duplicate() of you truly wanted to not use that
> application var scope.
>
>
>
> Kevin Penny, MMCP
> [EMAIL PROTECTED]
> Lead Developer, HotGigs.com
> "Not now I'm multitasking"
>
> -----Original Message-----
> From: Aaron Rouse [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 23, 2006 9:14 AM
> To: CF-Talk
> Subject: Re: Can I use the same instance of an object for all sessions?
>
> Something like
>
> Application.cfm
> Application.DAO = CreateObject("Component", "some.DAO");
>
> SomePage.cfm
> set App.DAO = Application.DAO;
> App.DAO.Read(Session.SomeID);
>
> Actually the copy into another scope happens at the bottom of the
> application.cfm since it is ran for every page.  The copy also is within a
> cflock.  I might be wrong in that path, perhaps that is not doing a true
> copy and it still has references.
>
> On 3/23/06, Troy Simpson <[EMAIL PROTECTED]> wrote:
> >
> > Aaron,
> >
> > Thank you for response.
> >
> > So let me see if I have this correct.
> > An example of your code would be something like this:
> >
> > application.cfm:
> > application.dao = createObject("component","some.dao");
> >
> > Then some where in your code you might have some
> > onCreateNewSession:
> > session.dao = application.dao;
> > session.dao.read(session.record);
> >
> > Is this what you are describing?
> >
> > --
> > Thanks,
> > Troy
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236055
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to