Version 1 (modified by davidhenry@…, 17 years ago)

--

Application.cfc Integration with MG3

You can add listeners:

    <message-listener message="onApplicationStart(SessionStart/SessionEnd" function=".." />

http://localhost:8500/modelgluesamples/applicationcfc/

I'm an example of using the new "onApplicationStart", "onSessionStart", and "onSessionEnd" broadcasts.

According to its controller, this app has 1 active session. If you open a second type of browser or browse from another computer, you should see this number go up when you reload.

To listen for any of these events, just add a message listener tag to any of your controllers:

    <controller id="Controller" type="modelgluesamples/applicationcfc.controller.Controller">
    	<message-listener message="onApplicationStart" function="onApplicationStart" />
    	<message-listener message="onRequestStart" function="getSessionCount" />
    	<message-listener message="onSessionStart" function="onSessionStart" />
    	<message-listener message="onSessionEnd" function="onSessionEnd" />
    </controller>

Like any other message broadcast, you can have as many listener functions as you desire.