Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
fernimac #1
OnSessionEnd
I am programming an application, and I would like to file in a database the
exact time at which a visitor arrived to a certain page and then shut the
browser or his session timed out. Is it possible to write the data through an
Insert into the database from an OnSessionEnd event in my application.cfc file?
Thank you.
Fernando.
fernimac Guest
-
Preventing OnSessionEnd from firing for each instancein a cluster.
Hi, I have a clustered setup of three computers each with a cf server instance configured in a round-robin cluster with J2EE session variables... -
onSessionEnd Not Firing
I'm having a problem getting onSessionEnd to run when the session times out. I copied the code off of the CF doc pages and it doesn't create the log... -
onSessionEnd()
I am currently programming an app and would like to make it so that if the user leaves the browser open and their session times out, it will kick... -
onSessionEnd problem
I have this UDF being called in the function onSessionEnd in my application.cfc file: <cffunction name="writeUserData" access="public"... -
mpwoodward *TMM* #2
Re: OnSessionEnd
On 2005-07-08 10:41:45 -0500, "fernimac" <webforumsuser@macromedia.com> said:
You can put whatever you want in your onSessionEnd event--as far as I> I am programming an application, and I would like to file in a database
> the exact time at which a visitor arrived to a certain page and then
> shut the browser or his session timed out. Is it possible to write the
> data through an Insert into the database from an OnSessionEnd event in
> my application.cfc file?
>
> Thank you.
>
> Fernando.
know there aren't any real limitations. Did you try it and run into
problems?
Matt
--
Matt Woodward
[email]mpwoodward@gmail.com[/email]
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
fernimac #3
Re: OnSessionEnd
Hi Matt,
I have a page that stores some values as session variables. Then, I am trying
to store those values into a database whenever a timeout happens through a
stored procedure. My code is as follows:
<cfcomponent>
<cfset This.name = "MyApp">
<cfset This.SessionManagement = "yes">
<cfset This.SessionTimeOut = "#createtimespan(0,0,15,0)#">
<cfset This.ApplicationTimeOut = "#createtimespan(5,0,0,0)#">
<cfset This.setClientCookies = "yes">
<cfset This.ClientManagement = "true">
<cfset This.ClientStorage = "cookie">
<cffunction name="onSessionEnd" returnType="void">
<cfargument name="SessionScope" required=True/>
<CFSTOREDPROC procedure="spAddPage" datasource="Mydata">
<CFPROCPARAM type="IN" dbvarname="@ID_per"
value="#Arguments.SessionScope.PER#" cfsqltype="CF_SQL_CHAR">
<CFPROCPARAM type="IN" dbvarname="@ID_acct"
value="#Arguments.SessionScope.ACCT#" cfsqltype="CF_SQL_SMALLINT">
<CFPROCPARAM type="IN" dbvarname="@ID_pag"
variable="#Arguments.SessionScope.PAG#" cfsqltype="CF_SQL_INT">
<CFPROCPARAM type="IN" dbvarname="@Time"
variable="#Arguments.SessionScope.TIME#" cfsqltype="CF_SQL_INT">
</CFSTOREDPROC>
</cffunction>
</cfcomponent>
But it does not seem to work. What am I doing wrong?
Thank you a lot.
fernimac Guest
-
fernimac #4
Re: OnSessionEnd
Everything works just fine. I had two typos in my code.
Thank you anyway.
fernimac Guest



Reply With Quote

