Hi Ezra,

Thanks for the explanation. I am afraid though the onSessionStart
handler doesn't execute when I arrange things like you describe.

Here is what I do:

ModelGlue.xml contains

        <controller name="applicationController"
type="application.controller.controller">
                <message-listener message="modelglue.onSessionStart"
function="onSessionStart" />
                <message-listener message="modelglue.onRequestStart"
function="onRequestStart" />
                [more message-listeners]
        </controller>

application.controller.controller contains

        <cffunction name="onSessionStart" access="public" output="false"
hint="Coldfusion implicit event">
                <cfset var localData={}>
                <cfset
localData.utilityService=APPLICATION["_modelglue"].getBean("UtilityService")>
                <!--- Set flag letting MG know it needs to broadcast 
onSessionStart
before onRequestStart --->
                <cfset request._modelglue.bootstrap.sessionStart = true />
                <cfset
session.locale=localData.utilityService.convertAccLanToLocale()>
<cfdump var="#getLocale()#">
<cfabort>
        </cffunction>

When I start a new session by deleting domain cookies, the app returns
to the login screen. It should show the <cfdump var="#getLocale()#">
since I request a page without sendinf CFID/CFTOKEN/JSessionId
cookies. I checked Application.cfc and it didn't contain an
onSessionStart handler that might get called instead of the one in the
controller.
So it looks like the onSessionStart() doesn't get executed in
controller.
When I move the onSessionStart() handler from controller/controller to
Application.cfc and I remove domain cookies again, a page refresh
gives me the <cfdump>.

Then I tried with onRequestStart and this didn't work either - until I
changed the message listener from

                <message-listener message="modelglue.onRequestStart"
function="onRequestStart" />

to
                <message-listener message="onRequestStart"
function="onRequestStart" />

Then I got to the <cfdump> I put in it after a page refresh.

I am not sure if I am missing or overlooking something - just let you
know

I use MG - versionIndicator key says "GESTURE" (didn't find something
like getModelGlue().getVersion() so dumped getModelGlue()) on CF9,0,1

Marc

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