Thanks again barney, your suggestion lead me down the right path. I'm just
posting what I came up with for the sake of the archives.
The only place I could find to use getMaxInactiveInterval() was on an actual
node inside the returned structure of getSessionCollection().
I don't like the loop but it works. I don't guess I've ever had the need to
traverse a collection without a loop. Is it even possible to access the
nodes of a collection without looping over it? It would be nice to lose the
loop in this function:
<cfscript>
function getSessionTimeout(appName)
{
var i = 1;
var sessionTiemOutValue = 'Unkown';
var tracker =
createObject("java","coldfusion.runtime.SessionTracker");
var sessions = tracker.getSessionCollection(appName);
for (i in sessions){
sessionTimeoutValue =
sessions[i].getMaxInactiveInterval();
break;
}
return sessionTimeoutValue;
}
</cfscript>
<cfdump var="#getSessionTimeOut(application.applicationName)#">
Cheers
..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Monday, April 21, 2008 2:21 PM
To: CF-Talk
Subject: RE: Reading sessiontimeout dynamically
Hey thanks Barney. Good stuff. Even if I don't find what I'm looking for in
there, I'm sure I'll find something useful!
...:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Monday, April 21, 2008 2:01 PM
To: CF-Talk
Subject: Re: Reading sessiontimeout dynamically
You can read the request timeout from the internal Java singletons
underlying CF:
http://www.barneyb.com/barneyblog/2007/08/17/requestmonitorgetrequesttimeout
/
I'd imagine that reading the session timeout would be similarly
accomplished, though you'd need to find the session monitor, not the
request monitor.
cheers,
barneyb
On Mon, Apr 21, 2008 at 10:37 AM, Bobby Hartsfield
<[EMAIL PROTECTED]> wrote:
> Does anyone know of a way (or if it's even possible) to programmatically
> read the sessiontimeout value of a CF app?
>
>
>
> ..:.:.:.:.:.:.:.:.:.:.:.:.
>
> Bobby Hartsfield
>
> http://acoderslife.com
>
> http://cf4em.com
>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303925
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4