Created
December 14, 2010 15:55
-
-
Save imageaid/740610 to your computer and use it in GitHub Desktop.
The CFML Application.cfc file ... basic!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent output="false"> | |
<cfset this.name = "JMSTest"> | |
<cfset this.applicationTimeout = createTimeSpan(0,2,0,0)> | |
<cfset this.clientManagement = false> | |
<cfset this.sessionManagement = false> | |
<cfset this.setClientCookies = true> | |
<cfset this.setDomainCookies = false> | |
<!--- Run when application starts up ---> | |
<cffunction name="onApplicationStart" returnType="boolean" output="false"> | |
<!--- HACK ALERT ---> | |
<cfscript> | |
// For some reason, I need to setup the initial topics from Railo/CFML server before the first Flex client subscribes. | |
// So, I publish two blank messages to the topics on app startup. | |
// Short-run/hack, I created an initMessages method on the messageService object to initialize the messages | |
// There MUST be a better way! | |
var messageService = createObject("java","com.kronum.gateways.adapters.KronumJMSPublisher"); | |
messageService.initMessages("kronumAnnouncements"); | |
messageService.initMessages("kronumMessages"); | |
</cfscript> | |
<cfreturn true> | |
</cffunction> | |
<!--- Run when application stops ---> | |
<cffunction name="onApplicationEnd" returnType="void" output="false"> | |
<cfargument name="applicationScope" required="true"> | |
</cffunction> | |
<!--- Run before the request is processed ---> | |
<cffunction name="onRequestStart" returnType="boolean" output="false"> | |
<cfargument name="thePage" type="string" required="true"> | |
<cfreturn true> | |
</cffunction> | |
<!--- Runs at end of request ---> | |
<cffunction name="onRequestEnd" returnType="void" output="false"> | |
<cfargument name="thePage" type="string" required="true"> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment