Some questions / points

1) Are you using Application.cfm, or Application.cfc?

I assume you are using Application.cfm, you will need to do some
locking of this, as you can definitely get 2 people hitting your
website at the same time, which can instantiate 2 copies of your
model. Not what you want.  I would suggest moving to Application.cfc,
onApplicationStart() event, as this will manage this for you.

2) When you say ' concurrent sessions are infecting each other's
records.', what does that mean? What information is being passed
across, and how is that information being managed?

3) Why are you pulling everything out of CS to push into your
application scope? The idea is to let CS manage it for you... you are
just giving yourself more work ever time you create something new.  I
would just reference it directly from the beanFactory.  That being
said, is there nothing in FuseBox that will autowire your controllers
for you, like you can in Mach-II, Model-Glue or ColdBox, so you don't
have to manage pulling objects out of CS directly?

Mark

On Fri, Apr 17, 2009 at 5:17 PM, Gavin Baumanis <[email protected]> wrote:
>
> Hi Steve,
>
> No it is not defined in cfparam prior to the CFIF.
> it is set as the last step of the CFIF branch.
>
> Why would it (cfparam) be needed in this case?
>
>
> Gavin.
>
>
>
> On Apr 17, 4:27 pm, "Steve Onnis" <[email protected]> wrote:
>> Do you have a cfparam at the top of that setting the initialised variable?
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf
>>
>> Of Gavin Baumanis
>> Sent: Friday, 17 April 2009 3:56 PM
>> To: cfaussie
>> Subject: [cfaussie] Session / application scope management.
>>
>> Hi Everyone,
>>
>> I am working on a nice small project and using it as a learning aid
>> for Coldspring and OOP in general.
>>
>> At the moment, I am creating all of me coldspring beans and manager /
>> gateway CFC's as singletons, with the code below.
>>
>> In this configuration, concurrent sessions are infecting each other's
>> records.
>> if I remove the CFIF's no such contamination occurs.
>>
>> Which is the weird part. (well to me anyway).
>>
>> Is there anything that stands out that I am doing wrong?
>> And If you need anything else, I.e. the gateway calls or anything,
>> just let me know and I willpost up any missing information you might
>> require.
>>
>> Thanks!
>>
>> <cfif not isDefined("application.initialised") OR
>> application.initialised EQ false>
>>
>>         <!--- Initialize ColdSpring --->
>>         <cfset coldspringConfig = 'coldspring.xml' />
>>
>>         <cfset properties = StructNew() />
>>         <cfset properties.dsnName = "itw" />
>>
>>         <cfset application.beanFactory = CreateObject('component',
>> 'coldspring.beans.DefaultXmlBeanFactory').init
>> (defaultProperties=properties) />
>>         <cfset application.beanFactory.loadBeans(coldspringConfig) />
>>
>>         <cfset application.userManager = application.beanFactory.getBean
>> ('userManager') />   <!--- Get the User Service CFC from ColdSpring. ---
>>
>>         <cfset application.userGateway =
>> application.userManager.getUserGateway() />          <!--- Now get the
>> Gateway
>> that ColdSpring set into the User Service.--->
>>
>>         <!--- Initialise the Questions --->
>>         <cfset application.questionManager = application.beanFactory.getBean
>> ('questionManager') />
>>         <cfset application.questionGateway =
>> application.questionManager.getQuestionGateway() />
>>
>>         <cfset application.answerManager = application.beanFactory.getBean
>> ('answerManager') />
>>         <cfset application.answerGateway =
>> application.answerManager.getAnswerGateway() />
>>
>>         <cfset application.definitionManager =
>> application.beanFactory.getBean
>> ('definitionManager') />
>>         <cfset application.definitionGateway =
>> application.definitionManager.getDefinitionGateway() />
>>
>>         <!--- Initialise the assessment --->
>>         <cfset application.assessmentManager =
>> application.beanFactory.getBean
>> ('assessmentManager') />
>>         <cfset application.assessmentGateway =
>> application.assessmentManager.getassessmentGateway() />
>>
>>         <!--- Create the pages object --->
>>         <cfset application.pageManager = application.beanFactory.getBean
>> ('pageManager') />
>>         <cfset application.pageGateway =
>> application.pageManager.getPageGateway() />
>>
>>         <cfset application.initialised = true>
>> </cfif>
>>
>> <cfinclude template="../fusebox5/fusebox5.cfm" />
>>
>>
> >
>



-- 
E: [email protected]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to