Changes between Initial Version and Version 1 of HowTos/ApplicationCFCIntegration

Show
Ignore:
Timestamp:
05/04/09 10:18:41 (17 years ago)
Author:
davidhenry@… (IP: 174.99.26.254)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTos/ApplicationCFCIntegration

    v1 v1  
     1= Application.cfc Integration with MG3 = 
     2 
     3You can add listeners: 
     4{{{ 
     5    <message-listener message="onApplicationStart(SessionStart/SessionEnd" function=".." /> 
     6}}} 
     7 
     8http://localhost:8500/modelgluesamples/applicationcfc/ 
     9 
     10I'm an example of using the new "onApplicationStart", "onSessionStart", and "onSessionEnd" broadcasts. 
     11 
     12According 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. 
     13 
     14To listen for any of these events, just add a message listener tag to any of your controllers: 
     15{{{ 
     16    <controller id="Controller" type="modelgluesamples/applicationcfc.controller.Controller"> 
     17        <message-listener message="onApplicationStart" function="onApplicationStart" /> 
     18        <message-listener message="onRequestStart" function="getSessionCount" /> 
     19        <message-listener message="onSessionStart" function="onSessionStart" /> 
     20        <message-listener message="onSessionEnd" function="onSessionEnd" /> 
     21    </controller> 
     22}}} 
     23Like any other message broadcast, you can have as many listener functions as you desire.