Created
July 1, 2010 12:22
-
-
Save misterdai/459885 to your computer and use it in GitHub Desktop.
Stops a Coldfusion session
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
<cffunction name="sessionStop" output="false"> | |
<cfset var local = StructNew() /> | |
<cfif Not StructKeyExists(application, 'applicationName')> | |
<cfthrow message="Application.applicationName is missing." /> | |
</cfif> | |
<cftry> | |
<cfset local.sid = session.cfid & '_' & session.cftoken /> | |
<cfset local.jTracker = CreateObject('java', 'coldfusion.runtime.SessionTracker') /> | |
<cfset local.jTracker.cleanUp(application.applicationName, local.sid) /> | |
<cfcatch type="any"> | |
<cfthrow message="Error stopping session, may not exist." /> | |
</cfcatch> | |
</cftry> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment