Yes, you shouldn't rely on finalizers to clean-up session objects.
Better do it in your listener.
Len Popp wrote:
I'm pretty sure that the finalizers are only called when garbage
collection reclaims the objects, and that will be some time after the
session is invalidated. Possibly a very long t
I'm pretty sure that the finalizers are only called when garbage
collection reclaims the objects, and that will be some time after the
session is invalidated. Possibly a very long time after, if Tomcat
isn't busy and isn't using much memory.
--
Len
On 7/7/05, Nishant Deshpande <[EMAIL PROTECTED]>
I store a bunch of objects in my session.
After the session timeout, I see the session getting invalidated (via
my listener).
Now I am expecting to see the finalizers from the objects in the
session being called - I'm pretty sure I don't have any other
references to them.
I don't see the finaliz
Howdy,
An invalidated session is one that should not be treated as valid ;) This means a few
things:
- To the container: this session does not need to be persisted
- To the container: this session does not need to be clustered
- To the container: remove attributes from this session
- To the
On 10/15/2003 02:10 PM Carlos-Roberto Queiroz wrote:
Sorry for the dull question, but I´d like to know what an invalidated
session is, and when a session gets invalidated (just timeout ?)
also when you call session.invalidate()
Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20
Sorry for the dull question, but I´d like to know what an invalidated
session is, and when a session gets invalidated (just timeout ?)
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
At 01:10 AM 8/1/2003, you wrote:
But surely theres a better way?
Whould I be better off replacing "session.invalidate()" with "session =
null"?
No, you wouldn't be better off -- it won't work. :) There's no reason not
to like this solution, IMHO. If it makes your code look ugly, put it in a
invalidated session
I'm trying to ensure that a session is newly created when I reach my index
page. The logic is reversed from your question but I believe the principle
is the same inasmuchas I want to know whether or not a valid session exists.
if (! session.isNew() )
{
session.inval
hree months of playing with this as a spare time
hobby feel free to critique the solution please.
Murray
-Original Message-
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 August 2003 18:10
To: Tomcat Users List
Subject: RE: Checking for invalidated session
But surely theres
ECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for invalidated session
At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
if( !session.isInvalidated()) <-- what should go here?
{
session.invalid
But surely theres a better way?
Whould I be better off replacing "session.invalidate()" with "session = null"?
-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 6:44 PM
To: Tomcat Users List
Subject: Re: Checking for
At 08:31 AM 7/31/2003, you wrote:
How can you check to see if a session has already been validated?
i.e.
if( !session.isInvalidated()) <-- what should go here?
{
session.invalidate();
}
to prevent the following exception:
"org.apache.jasper.JasperException: invalidate: Session already inva
mcat Users List'
Subject: RE: Checking for invalidated session
Importance: High
sorry.
session = request.getSession( false );
if( session != null )
{
session.invalidate();
}
---
Fabio Moraes
[EMAIL PROTECTED]
System Engineer
Work Force Management System
+55 21 3088 9548
-Origin
, July 31, 2003 12:37
To: 'Tomcat Users List'
Subject: RE: Checking for invalidated session
Importance: High
i guess this will work fine ...
session = request.getSession( false );
if( session.isNew( ) )
{
out.println( "new session" );
}
someone let me know
55 21 3088 9548
-Original Message-
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:32
To: [EMAIL PROTECTED]
Subject: Checking for invalidated session
Hi,
How can you check to see if a session has already been validated?
i.e.
if( !session.isInvalidated()) <-- w
Hi,
How can you check to see if a session has already been validated?
i.e.
if( !session.isInvalidated()) <-- what should go here?
{
session.invalidate();
}
to prevent the following exception:
"org.apache.jasper.JasperException: invalidate: Session already invalidated"
--
16 matches
Mail list logo