Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Blowing away objects that have been stored in the session context

Adrian Beech

2003-10-05

Replies:

G'day all,

Does Tomcat release all the resources used by an object if the object
has been stored in the session context and a call to
session.removeAttribute("objName") is made? I'd like to blow away
several beans that are used throughout the processing of a transaction
once the confirmation page is called.

At this stage the only two ways I can think of doing this is to call
session.removeAttribute(...) or retrieve the object from the session
context and then assigning null to it, i.e. myObj = (MyObj)
session.getAttribute("myObjName"); myObj = null;.

Can someone please shed some light on what is best? Or are these two
possible ways totally off the track?

Thanks if you can help.

AB



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.