On 20 December 2013 04:10, Daniel Mikusa <dmik...@gopivotal.com> wrote:
> When run, you'll see that it processes some of the requests but fails due to 
> a timeout.  I've not been able to replicate the other exceptions with the 
> unit test though, so those may be unrelated.

>     @WebServlet(asyncSupported = true)
>     public class DataStreamingServlet extends HttpServlet {

>         @Override
>         protected void service(HttpServletRequest request, 
> HttpServletResponse response) throws ServletException, IOException
>         {
               ...
>             DataStreamWriteListener dswl = new 
> DataStreamWriteListener(asyncContext, blocks);
>             response.getOutputStream().setWriteListener(dswl);
>         }

>         private class DataStreamWriteListener implements WriteListener {
>
>                 @Override
>                         public void onWritePossible() throws IOException {
>                         ServletOutputStream output = 
> context.getResponse().getOutputStream();

> Any thoughts on what's happening here?

This is a total guess ... getOutputStream() is waiting on a lock it
will never acquire?  (Increase the timeout, do a thread-dump).  What
happens if you instead pass the ServletOutputStream to the
DataStreamWriteListener's constructor?

cheers,
David.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to