[wildfly-dev] WF 8.0 HTTP Upgrade help needed

PB pbielicki at gmail.com
Fri Mar 28 16:05:04 EDT 2014


Hi,

I dare to say that my code is correct ;) The problem is that it is NEVER
called - this condition (even if it's wrong, however it's not) is never
checked. When I remove this line:

out.setWriteListener(new EchoWriteListener(queue, out));

it seems to work. However, I have no writer, so it should be rather called
SwallowListener... It's not my goal.

Maybe I should initialize WriteListener from the ReadListener after the
first read? Or maybe, when I want to send back the response I should do
this directly from the read listener? e.g.
https://java.net/projects/tyrus/sources/source-code-repository/content/trunk/containers/servlet/src/main/java/org/glassfish/tyrus/servlet/TyrusHttpUpgradeHandler.java

Thanks,
Przemyslaw


On Fri, Mar 28, 2014 at 5:14 PM, Heiko Braun <hbraun at redhat.com> wrote:

> At a first glance, I'd say your while{} block never returns. Is
> ServletInputStream.isFinished() what you've been looking for, instead of
> isReady()
>
> On 28 Mar 2014, at 16:26, PB <pbielicki at gmail.com> wrote:
>
> while (in.isReady()) {
>
>
> --
>
> http://about.me/hbraun
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20140328/af0541c8/attachment-0001.html 


More information about the wildfly-dev mailing list