"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
>
> Applica
ot 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(&q
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 wi
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;
I do this but with one exception, I copy it from the application scope to a
local scope then do the inserts, updates, etc. I think if you left it in
the application scope then you probably would need to do a cflock and that
would seem to lead to contribute to issues when a query might take awhile
5 matches
Mail list logo