<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Hi,</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">
you are right! I tried with Safari and it works as expected.</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">
Maybe somebody from undertow's team could explain why?</div>
<div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Best,</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">
Mikhail</div></div><div class="gmail_extra"><br clear="all"><div>Best,<br>Mikhail</div>
<br><br><div class="gmail_quote">2014-02-18 16:50 GMT+02:00 lanabe <span dir="ltr"><<a href="mailto:lanabe.lanabe@gmail.com" target="_blank">lanabe.lanabe@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi, Mikhail.<div><br><div>I got the same log.</div><div><br></div><div>[environment]</div><div>Undertow: <span style="font-size:13px;font-family:'comic sans ms',sans-serif">io.undertow:undertow-core:</span><span style="font-size:13px;font-family:'comic sans ms',sans-serif">1.0.</span><span style="font-size:13px;font-family:'comic sans ms',sans-serif">0.Final</span></div>
<div><font face="comic sans ms, sans-serif">OS: </font>Fedora19(64bit)</div><div>JDK: OpenJDK 1.7.0_51</div><div>Client: Google Chrome <span style="color:rgb(48,57,66);font-family:'VL \0030b4\0030b7\0030c3\0030af','VL PGothic','Sazanami Gothic','Kochi Gothic',sans-serif;font-size:12px">32.0.1700.107, Firefox </span><font color="#303942" face="VL ゴシック, VL PGothic, Sazanami Gothic, Kochi Gothic, sans-serif"><span style="font-size:12px">26.0</span></font></div>
<div><br></div></div><div>---</div><div class=""><div><div>Thread #XNIO-1 I/O-1 is I/O : handle this</div><div>Thread #XNIO-1 task-1 Start waiting</div><div>Thread #XNIO-1 task-1 Finish waiting</div><div><br></div><div>Thread #XNIO-1 I/O-1 is I/O : handle this</div>
<div>Thread #XNIO-1 task-2 Start waiting</div><div>Thread #XNIO-1 task-2 Finish waiting</div><div><br></div><div>Thread #XNIO-1 I/O-1 is I/O : handle this</div><div>Thread #XNIO-1 task-3 Start waiting</div><div>Thread #XNIO-1 task-3 Finish waiting</div>
</div></div><div>---</div><div><br></div><div>but, I got the expected following log by using curl.</div><div>---</div><div><div class=""><div>Thread #XNIO-1 I/O-1 is I/O : handle this</div><div>Thread #XNIO-1 task-1 Start waiting</div>
</div><div class=""><div>Thread #XNIO-1 I/O-1 is I/O : handle this</div>
<div>Thread #XNIO-1 task-2 Start waiting</div></div><div>Thread #XNIO-1 I/O-2 is I/O : handle this</div><div class=""><div>Thread #XNIO-1 task-3 Start waiting</div></div><div class=""><div>Thread #XNIO-1 task-1 Finish waiting</div>
<div><br></div></div><div class=""><div>Thread #XNIO-1 task-2 Finish waiting</div>
<div><br></div></div><div>Thread #XNIO-1 task-3 Finish waiting</div></div><div>---<br></div><div><br></div><div><span style="font-size:13px;font-family:Arial,'Arial New','\00ff2d\00ff33 \00ff30 \0030b4\0030b7\0030c3\0030af',sans-serif">hmm..</span>.Does it depends on browser settings?</div>
<div><br></div><div>Yoshimasa Tanabe</div><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 18, 2014 at 3:10 PM, Mikhail Tyamin <span dir="ltr"><<a href="mailto:mikhail.tiamine@gmail.com" target="_blank">mikhail.tiamine@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:'comic sans ms',sans-serif">
Hi,</div><div style="font-family:'comic sans ms',sans-serif">
<br></div><div>
<div><font face="comic sans ms, sans-serif">I am pretty sure, 15 sec. delay is enough to open additional browsers windows ;-)</font></div><div><font face="comic sans ms, sans-serif"><br>
</font></div><div><font face="comic sans ms, sans-serif">I try to run code with io.undertow:undertow-core:1.0.0.Final on mac with OS X 10.9.1 with jdk 1.7.0_51.</font></div><div>
<font face="comic sans ms, sans-serif"><br></font></div><div><font face="comic sans ms, sans-serif">So, could anybody reproduce this issue or give me feedback where is my error?</font></div></div></div>
<div class="gmail_extra"><br clear="all"><div>Best,<br>Mikhail</div>
<br><br><div class="gmail_quote">2014-02-18 5:22 GMT+02:00 Stuart Douglas <span dir="ltr"><<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>></span>:<div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Are you sure the requests are actually being made simultaneously? That code should definitely work.<br>
<br>
Stuart<br>
<div><div><br>
<br>
----- Original Message -----<br>
> From: "Mikhail Tyamin" <<a href="mailto:mikhail.tiamine@gmail.com" target="_blank">mikhail.tiamine@gmail.com</a>><br>
> To: <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
> Sent: Monday, 17 February, 2014 3:03:41 PM<br>
> Subject: [undertow-dev] what I do wrong?<br>
><br>
> Hello guys,<br>
><br>
> could you help me a little bit with Undertow?<br>
><br>
> I follow all instructions in Undertown's poor documentation. So here is the<br>
> class :<br>
><br>
> public class HelloWorldServer {<br>
><br>
> public static void main(String... args) {<br>
> Undertow server = Undertow.builder()<br>
> .addHttpListener(8080, "localhost")<br>
> .setHandler(new HttpHandler() {<br>
> @Override<br>
> public void handleRequest(final HttpServerExchange exchange) throws Exception<br>
> {<br>
> if (exchange.isInIoThread()) {<br>
> System.out.println("Thread #" + Thread.currentThread().getName() + " is I/O :<br>
> handle this");<br>
> exchange.dispatch(this);<br>
> return;<br>
> }<br>
><br>
> //[1]<br>
> System.out.println("Thread #" + Thread.currentThread().getName() + " Start<br>
> waiting");<br>
> Thread.sleep(15000);<br>
> System.out.println("Thread #" + Thread.currentThread().getName() + " Finish<br>
> waiting");<br>
><br>
> System.out.println();<br>
><br>
> exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain");<br>
> exchange.getResponseSender().send("Hello world from thread " +<br>
> Thread.currentThread().getId());<br>
> //[2]<br>
> }<br>
> }).build();<br>
><br>
> server.start();<br>
> }<br>
> }<br>
><br>
> When I start it and make three http get request simultaneously I can see this<br>
> output in console :<br>
><br>
> Thread #XNIO-1 I/O-1 is I/O : handle this<br>
> Thread #XNIO-1 task-1 Start waiting<br>
> Thread #XNIO-1 task-1 Finish waiting<br>
><br>
> Thread #XNIO-1 I/O-1 is I/O : handle this<br>
> Thread #XNIO-1 task-2 Start waiting<br>
> Thread #XNIO-1 task-2 Finish waiting<br>
><br>
> Thread #XNIO-1 I/O-1 is I/O : handle this<br>
> Thread #XNIO-1 task-3 Start waiting<br>
> Thread #XNIO-1 task-3 Finish waiting<br>
><br>
><br>
> I think that code beetween //[1] and //[2] should perform in separate thread<br>
> (and as we can see from the console it really does), but why the main I/O<br>
> thread are waiting and does not handle other requests?<br>
><br>
> So if my code is correct than it means that Undertow could handle one request<br>
> in time...<br>
><br>
> What I do wrong?<br>
><br>
> Best,<br>
> Mikhail<br>
><br>
</div></div>> _______________________________________________<br>
> undertow-dev mailing list<br>
> <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>