users@grizzly.java.net

Re: Problems with pipelining requests

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 15 Dec 2008 14:57:11 -0500

Patrick Julien wrote:
> On Mon, Dec 15, 2008 at 2:22 PM, Jeanfrancois Arcand
> <Jeanfrancois.Arcand_at_sun.com> wrote:
>> Salut,
>>
>
>> I'm not sure this is mandatory as none of the current browser supports it by
>> default. Would you be able to create a test case I can use? I want to see
>> what's happening and see if a Grizzly extension can be written to supports
>> what you need.
>>
>
> It was my understanding from reading the following document:
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
>
> that it was. That being said, I can, the problem is that my code is
> all for Java ME. High level up, all I did was:
>
> 1. Using Jersey,request a resource listing of a particular resource
> 2. Collect all the URLs given by this listing
> 3. Using a raw SocketConnection, send in well formed HTTP 1.1 requests
> following this model:
>
> StringBuffer request = new StringBuffer();
> request.append("GET ");
> request.append(restEndPoint);
> request.append(" HTTP/1.1\r\n");
> request.append("Host: ");
> request.append(hostName);
> request.append("\r\n");
> request.append("User-Agent: Mobile\r\n");
> request.append("accept: application/json\r\n");
> request.append("Accept-Encoding: gzip;q=1.0\r\n");
> request.append("\r\n\r\n");


So far so good. Can you add content=length=<<lenght of the above
message" to see if that help? Also can you send me a jstack PID when the
"lock" happens? I'm pretty usre the parser is waiting for more bytes.


>
> Where restEndPoint is a string containing the url that was found in
> the original response generated by the REST service and hostName is
> the host I am connecting too.
>
> So, from a server point of view, any Jersey sample should do, e.g.,
> the customer db jersey sample would work. I am referring to this one
> here:
>
> http://www.netbeans.org/kb/60/websvc/rest.html
>
> I can work on making a Java SE client of this but considering how much
> of an investment this is, I would just like to know the answer to my
> original question, if at all possible, which is how to turn logging on
> for the grizzly found in glassfish so that I can actually see what is
> going on.

Add -Dcom.sun.enterprise.web.connector.grizzly.snoopEnabled=true and
send the log here. But I doubt you will find http pipelining support
with Tomcat (the parser code here is from them)...I think Jetty might
work, but I'm clearly not sure....

A+

-- Jeanfrancois


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>