Mantis - Resin
Viewing Issue Advanced Details
4360 minor always 01-25-11 14:36 01-25-11 15:53
ferg  
ferg  
normal  
closed 4.0.14  
fixed  
none    
none 4.0.15  
0004360: comet/async flushing/header behavior
(rep by Manoj Chennath)

> > public class AceFilter implements Filter {
> >
> > public void doFilter(ServletRequest servletRequest,
> > ServletResponse servletResponse,
> > final FilterChain filterChain)
> > throws IOException, ServletException {
> >
> > HttpServletResponse res = (HttpServletResponse) servletResponse;
> > res.addHeader("filter-header", "added");
> >
> > final AsyncContext context =
> > servletRequest.startAsync(servletRequest,
> > servletResponse);
> >
> > new Thread(new Runnable(){
> >
> > public void run() {
> > try {
> > Thread.sleep(1000*20);
> >
> > //filterChain is used from a different thread.
> > //Container should not reuse filterChain before
> > //context complete.
> > filterChain.doFilter(context.getRequest(),
> > context.getResponse());
> > } catch (Exception e) {
> > e.printStackTrace();
> > } finally {
> > context.complete();
> > }
> > }
> > }).start();
> > }
> >

Notes
(0004995)
ferg   
01-25-11 15:53   
server/11a3