Peter,

You could set a variable to represent the application's sessiontimeout
value, then simply run a datediff between the recorded time and current time
(now()). Check this datediff result against the timeout value, then act
accordingly i.e. datediff is larger then the session has expired.

HTH,
Dave

> -----Original Message-----
> From: Peter Theobald [mailto:[EMAIL PROTECTED]
> Sent: 01 August 2003 16:40
> To: CF-Talk
> Subject: RE: check through all open sessions?
>
>
> This is a very good idea, but for my purposes (I didn't ask
> the original question) I need to know when the session is
> scheduled to time-out. How do I get that info for a session?
> In other words, when a page request runs a session's
> last-used-time is reset to NOW(). But as times goes on the
> session gets closer to it's time-out. When the time-out hits
> some "invisible" activity in the CF server will expire the
> session and throw away the session variables. How do I get
> the current time-out value or "age" of each session?
> -Peter
>
> At 01:29 PM 8/1/2003 +0100, Tim Blair wrote:
> >> Thanks, this is pretty much what I had in mind, but how do I
> >> actually retrieve the session.sellcustomer variable from each
> >> active session to place them into my structure?
> >
> >How about creating an application var, say: <cfset
> >application.sessionref = structnew()> then during the
> initialisation of
> >each request (Application.cfm, fbx_Settings.cfm etc) do
> something like:
> >
> ><cfset application.sessionref[sessionid] = session>
> >
> >Where the sessionid variable is some variable unique to that session
> >(memberID, jsessionid etc).  That will store a _reference_ to the
> >current session in the application scope.  You can then loop
> through the
> >application.sessionref struct <cfloop
> >collection="#application.sessionref#" ...> and do what you
> want with the
> >info stored.
> >
> >Tim.
> >
> >
> >-------------------------------------------------------
> >RAWNET LTD - Internet, New Media and ebusiness Gurus.
> >Visit our new website at http://www.rawnet.com for
> >more information about our company, or call us free
> >anytime on 0800 294 24 24.
> >-------------------------------------------------------
> >Tim Blair
> >Web Application Engineer, Rawnet Limited
> >Direct Phone : +44 (0) 1344 393 441
> >Switchboard : +44 (0) 1344 393 040
> >-------------------------------------------------------
> >This message may contain information which is legally
> >privileged and/or confidential.  If you are not the
> >intended recipient, you are hereby notified that any
> >unauthorised disclosure, copying, distribution or use
> >of this information is strictly prohibited. Such
> >notification notwithstanding, any comments, opinions,
> >information or conclusions expressed in this message
> >are those of the originator, not of rawnet limited,
> >unless otherwise explicitly and independently indicated
> >by an authorised representative of rawnet limited.
> >-------------------------------------------------------
> >
> >
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to