You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/03/03 18:35:54 UTC
DO NOT REPLY [Bug 33832] New: -
context attributes get lost
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33832>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33832
Summary: context attributes get lost
Product: Tomcat 5
Version: 5.5.7
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: omints@compuserve.de
I use ServletContextListener to start/stop of one internal working thread.
In contextInitialized(ServletContextEvent event) the Thread object will be
created and started, than registred as an attribute:
ServletContext context = event.getServletContext();
MailerThread mailerThread = new MailerThread(...);
context.setAttribute("de.mints.interrisk.mail.thread", mailerThread)
In contextDestroyed(ServletContextEvent event) the thread must be interrupted:
ServletContext context = event.getServletContext();
Thread thread = (Thread)context.getAttribute("de.mints.interrisk.mail.thread");
thread.interrupt();
Under Tomcat 5.5.4 it works fine, but under 5.5.7 thread == null. It seems the
context's attributes go lost.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org