since I call this from many pages, not knowing if
session object called "sessionObject" already exists, I do each time:
Code:
SessionObject sessionObject= new SessionObject(request);
Code:
package mc.session.objects;
public class sessionObject
{
....
public sessionObject(HttpServletRequest req) throws Throwable
{
HttpSession session = req.getSession(true);
if (session.getAttribute("sessionObject") != null)
{
// destruct this object as one instance of it, and only one
// that I need is already created
super.finalize();
}
}
Anything that I don't see here ?
Hope this "sessionObject" gets collected by gc
at the time session ends.