Ok, I wrapped the the invokeSessionEvent call in a try catch, and got
the following error:
Variable invokeSessionEvent is undefined?!!! That is very weird
indeed. Does anybody have any idea why this would be happening? Even
though the invokeSession Event is defined right below the OnSessionEnd
funcion?
<cffunction name="onSessionEnd" output="false">
<cfargument name="sessionScope" type="struct" required="true" />
<cfargument name="appScope" type="struct" required="false" />
<cftry>
<cfset invokeSessionEvent("modelglue.onSessionEnd",
arguments.sessionScope, arguments.appScope) />
<cfcatch type="any">
<cflog file="#arguments.appScope.applicationname#"
text="onSessionEnd Error: #cfcatch.type# - #cfcatch.message# -
#cfcatch.detail# - #cfcatch.stackTrace#" />
</cfcatch>
</cftry>
</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 />
<cfset values.appScope = arguments.appScope />
<cfloop from="1" to="#arrayLen(mgInstances)#" index="i">
<cfset mgInstances[i].executeEvent(arguments.eventName, values)
/>
</cfloop>
</cffunction>
The full stack trace...
"Information","scheduler-1","02/18/09","15:40:22",,"onSessionEnd
Error: Expression - Variable invokeSessionEvent is undefined. - -
coldfusion.runtime.UndefinedVariableException: Variable
invokeSessionEvent is undefined. at coldfusion.runtime.CfJspPage._get
(CfJspPage.java:182) at
cfApplication2ecfc412050557$funcONSESSIONEND.runFunction(C:\Inetpub
\ftproot\webroot\Application.cfc:191) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke
(UDFMethod.java:254) at coldfusion.filter.FunctionAccessFilter.invoke
(FunctionAccessFilter.java:56) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194) at
coldfusion.cfc.CFCProxyFilter.invokeAppEvent(CFCProxyFilter.java:96)
at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:47) at
coldfusion.filter.ClientScopePersistenceFilter.invoke
(ClientScopePersistenceFilter.java:28) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:257) at
coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:231) at
coldfusion.runtime.AppEventInvoker.onSessionEnd(AppEventInvoker.java:
236) at coldfusion.runtime.SessionTracker.cleanUp
(SessionTracker.java:246) at coldfusion.runtime.SessionTracker.access
$000(SessionTracker.java:11) at coldfusion.runtime.SessionTracker
$SessionCleanUpAgent.run(SessionTracker.java:338) at
coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201) at
coldfusion.scheduling.WorkerThread.run(WorkerThread.java:70) "
On Feb 18, 2:38 pm, zurielb <[email protected]> wrote:
> Hey guys, I just want to know if any of you has seen this behavior
> before. Here's the story:
>
> We are depending on the ModelGlue onSessionEnd to do a couple of
> cleanup tasks in our application. We just have a couple of Controllers
> respond to the OnSessionEnd message (set up in our modelglue config
> file).
>
> It all works great in our dev environment (we're running OS X), but
> when we go to our Production environment (on Windows 2003), the Model-
> Glue onSessionEnd simply stops firing. I have confirmed, by adding a
> couple of cflogs, that the Application.cfc onSessionEnd is firing
> correctly, but when it comes time to fire the ModelGlue onSessionEnd,
> nothing is happening.
>
> I have been able to isolate the problem to a call to the
> invokeSessionEvent function inside the Application.cfc. If you look at
> it, the code looks like this:
>
> <cffunction name="onSessionEnd" output="false">
> <cfargument name="sessionScope" type="struct" required="true" />
> <cfargument name="appScope" type="struct" required="false" />
>
> <cfset invokeSessionEvent("modelglue.onSessionEnd",
> arguments.sessionScope, arguments.appScope) />
> </cffunction>
>
> very simple right? If i place a cflog before the call to the function,
> i can see that onSessionEnd gets called every time. If i place cflogs
> inside the invokeSessionEvent function... nothing happens... it's
> almost like it never gets called.
>
> I have copied and pasted the invokeSessionEvent code INSIDE the
> onSessionEnd function, and everything works great again. It doesn't
> make any sense.
>
> any ideas? :)
>
> I will continue investigating this. My next idea is to wrap the
> invokeSessionEvent on a try catch, see if anything if an error is
> getting thrown in there...
--~--~---------~--~----~------------~-------~--~----~
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
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---