Do you have session management enabled?

On Fri, Dec 11, 2009 at 12:17 PM, Bob Silverberg
<[email protected]>wrote:

> Here are the relevant methods from App.cfc:
>
> <cffunction name="onSessionEnd" output="false">
>
> <cfargument name="sessionScope" type="struct" required="true">
>
> <cfargument name="appScope" type="struct" required="false">
>
>
>  <cflog file="sessionTest" text="session ending!" />
>
> <cfset invokeSessionEvent("modelglue.onSessionEnd",
> arguments.sessionScope, arguments.appScope) />
>
>
> </cffunction>
>
>
> <cffunction name="invokeSessionEvent" output="false" access="private">
>
> <cfargument name="eventName" />
>
> <cfargument name="sessionScope" />
>
> <cfargument name="appScope" />
>
>
>  <cfset var mgInstances = createObject("component",
> "ModelGlue.Util.ModelGlueFrameworkLocator").findInScope(arguments.appScope)
> />
>
> <cfset var values = structNew() />
>
> <cfset var i = "" />
>
>
>  <cfset values.sessionScope = arguments.sessionScope />
>
>
>  <cfloop from="1" to="#arrayLen(mgInstances)#" index="i">
>
> <cfset mgInstances[i].executeEvent(arguments.eventName, values) />
>
> </cfloop>
>
> </cffunction>
>
>
> which were copied from modelglueapplicationtemplate/Application.cfc.  Note
> that I actually added the arguments scope in front of the reference to
> appScope in both methods as it was missing.
>
> Here's what's in my MG.xml:
>
> <controller id="newController" type="controller.newController">
>
> <message-listener message="onSessionEnd" />
>
> </controller>
>
> And here's the contents of controller.newController.cfc:
>
> <cfcomponent output="false" hint="I am a Model-Glue controller." extends=
> "ModelGlue.gesture.controller.Controller">
>
>
>  <cffunction name="onSessionEnd" output="false">
>
> <cfargument name="sessionScope" type="struct" required="true">
>
> <cfargument name="appScope" type="struct" required="false">
>
>  <cflog file="sessionTest" text="onSessionEnd fired in controller!" />
>
>  </cffunction>
>
>
> </cfcomponent>
>
> When a session ends, I see one message in the log file, the one generated
> from onSessionEnd() in my Application.cfc, but I do not see the second
> message, which is meant to be generated by onSessionEnd() in my controller.
>
> Thanks,
> Bob
>
>
> On Fri, Dec 11, 2009 at 12:25 PM, Dennis Clark <[email protected]> wrote:
>
>> Bob, have you copied the methods in
>> modelglueapplicationtemplate/Application.cfc to your own Application.cfc?
>>
>>
>> On Fri, Dec 11, 2009 at 12:00 PM, Bob Silverberg <
>> [email protected]> wrote:
>>
>>> Looking at the code, it appears as if I can add an onSessionEnd function
>>> to a controller, along with an associated message listener in my xml file,
>>> and it should fire when a session ends.  But it's not firing.
>>>
>>> Any ideas?
>>>
>>> Cheers,
>>> Bob
>>>
>>> --
>>> Bob Silverberg
>>> www.silverwareconsulting.com
>>>
>>> --
>>> Model-Glue Sites:
>>> Home Page: http://www.model-glue.com
>>> Documentation: http://docs.model-glue.com
>>> Bug Tracker: http://bugs.model-glue.com
>>> Blog: http://www.model-glue.com/blog
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "model-glue" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<model-glue%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/model-glue?hl=en
>>>
>>
>>  --
>> Model-Glue Sites:
>> Home Page: http://www.model-glue.com
>> Documentation: http://docs.model-glue.com
>> Bug Tracker: http://bugs.model-glue.com
>> Blog: http://www.model-glue.com/blog
>>
>> You received this message because you are subscribed to the Google
>> Groups "model-glue" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<model-glue%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/model-glue?hl=en
>>
>
>
>
> --
> Bob Silverberg
> www.silverwareconsulting.com
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>



-- 
Chuck Savage
SeaRisen LLC
Website: http://www.SeaRisen.com

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" 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/model-glue?hl=en

Reply via email to