Hi,

We had an issue that has been resolved but felt it will be useful for others as 
an FYI posting.

- We use a servlet to handle async requests using an iframe so that data in the 
page is refreshed without submitting the entire page,similar to AJAX.

- Exceptions are not caught in the servlet and are handled by the error handler 
defined in web.xml (error-page for error type Throwable)

- We have a filter that initializes request attributes and to ensure we dont do 
it twice we had used a threadlocal that is checked before the request 
initialization is performed. Due to an earlier filter mapping the filter could 
be called more than once for each request.

This configuration failed in one scenario and is because JBoss was reusing the 
same thread to service a new request. We realized this because the threadlocal 
was already set and our request initialization code was being skipped. The 
scenario is given below...
- When the async request servlet threw an exception and it was not caught 
within the servlet, JBoss reused the same thread.
- When the exception was caught within the servlet and rethrown after cleanup 
the thread was not re-used.

Not able to understand this behaviour and not sure if this is a bug in Jboss. 
But as we have cleaned up the filter mapping, the threadlocal was removed and 
therefore the request initialization always happens now.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915133#3915133

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915133


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to