-
1. Re: out.flush() taking long time
nickarls May 31, 2013 2:44 AM (in response to rameshchokkapu)What is "a long time"? Does the servlet sometimes take a long time to do the work without the flush (since it is bound to flush implicitly anyway)?
-
2. Re: out.flush() taking long time
rameshchokkapu May 31, 2013 2:58 AM (in response to nickarls)Thank you for Reply..
long time means difference between time at after flush() method and time at before flush().
response may contains 2 KB to 2MB of data.
response data is xml string bytes.
flush() taking avergely 80 sec some times.
-
3. Re: out.flush() taking long time
nickarls May 31, 2013 3:11 AM (in response to rameshchokkapu)And if you don't flush(), does the request sometimes take 80 sec also?
-
4. Re: out.flush() taking long time
rameshchokkapu May 31, 2013 3:25 AM (in response to nickarls)Thank u For Reply
no, only fulsh() method taking that much time...
-
5. Re: out.flush() taking long time
nickarls May 31, 2013 3:33 AM (in response to rameshchokkapu)then don't do it ;-)
-
6. Re: out.flush() taking long time
rameshchokkapu May 31, 2013 4:08 AM (in response to nickarls)Thank u For Reply
OutputStream out = null;
byte[] otaRSBytes = otaRS.getBytes();
out = response.getOutputStream();
out.write(otaRSBytes);
// taking more time to flush the response
out.flush();
out.close();
is there any alternate method to out.flush() ?
-
7. Re: out.flush() taking long time
sfcoy May 31, 2013 8:55 AM (in response to rameshchokkapu)I don't want to discount the possibility that there might be a problem with the JBoss implementation of OutputStream.flush(), but as I mentioned in I/O performance down in Jboss AS 7 for Enterprise application, the bottleneck may well be the speed at which the client is able to consume the output.
What kind of content is it, and what is consuming it?
-
8. Re: out.flush() taking long time
nickarls Jun 3, 2013 2:34 AM (in response to sfcoy)Isn't the flush() called implicitly at the end of the request? One would think that the behaviour (client too slow) would also be visible without the explicit flush