tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Novotny <JDNovo...@lbl.gov>
Subject bean lifetimes
Date Sat, 20 Jan 2001 20:29:04 GMT

    Hi,

    How can I explicitly call a bean's destructor after a user has
clicked to another page? For instance if you have a session bean than
you can implements the HttpSessionBindingListener and use the
valueUnbound() method to free up resources.  An approach for an
application bean is to use the <%! public void jspInit() { } %> and <%!
public void jspDestroy() { } %> tags. However I can't find a way to
declare a bean with page scope and call a destructor if the user leaves
the page. Another question- I have a counter to check the number of
people logged in i.e. number of session beans, but if the client kills
their browser, the session bean still exists, causing the tally to be
inaccurate. Any insights are greatly appreciated!

    Thanks, Jason

--
Jason Novotny               novotny@george.lbl.gov
Home: (510) 704-9917        Work: (510) 486-8662
NERSC Distributed Computing http://www-didc.lbl.gov




Mime
View raw message