Concerning the JRun timeout, a better approach is probably to
increase the timeout of the thread. This can be done by editing the
jrun.ini file and increasing the 'timeout' value to something more
suitable to your needs.

        Hope this help

Jean Michel Augusto
[EMAIL PROTECTED]


> -----Original Message-----
> From: Christof Baumgaertner [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 17, 1999 13:37
> To: [EMAIL PROTECTED]
> Subject: Re: Timeout when long processing time for servlet
>
>
> Alvaro Fuentes wrote:
>
> > > Hi,
> > >
> > >
> > > My problem is that the browser (or is is the
> servlet/webserver) goes in
> > > timeout after about 70 secs. The execution of the method
> generating the
> > > report is then stopped, and the user is presented with a
> blank white page.
> >
> > I had the same problem working with JDBC. When trying to
> retrive a lot of info
> > from a table (more than 200, 300 rows), JRun launches
> TimeoutException and stops
> > the execution. The code I used was similar to:
> >
> > StringBuffer sb = new StringBuffer();
> > //makes the statement...
> > ResultSet pp = stmt.executeQuery(sql);
> > while (pp.next()) {
> >     //retrieve the row and converit into a HTML string
> >    ...
> >    sb.append(HTMLString+"\n");
> > }
> > //closes the connection
> > ...
> > res.getOutputStream.print(sb.toString());
> > ...
> >
> > You can print the info as soon as it is retrieved:
>
> or you can just simply output whatever you want (for example
> blanks) to the
> ServletOutputStream every min(149,JRunTimeout) seconds (150
> seconds is the browsers
> timeout).
>
>
>
> >
> >
> > //makes the statement...
> > ResultSet pp = stmt.executeQuery(sql);
> > while (pp.next()) {
> >     //retrieve the row and converit into a HTML string
> >    ...
> >    res.getOutputStream.print(HTMLString}
> > //closes the connection
> > ...
> >
> > The server is no longed interrupted and the user can see
> the query results
> > sooner.
> >
> > Hope this helps.
> >
> >
> ______________________________________________________________
> _____________
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> http://archives.java.sun.com/archives/servle> t-interest.html
> >
> Resources:
> http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> --
> "Some will tell you that an organization is the people who
> make it up, but that's
> not the case at all.
> The whole is larger and completely different from the sum of
> its parts. [...] The
> underlying theory is
> that you motivate people to provide value to society by
> making it be in their best
> interest to do so."
> Jamie Zawinski
>
> ______________________________________________________________
> _____________
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
> http://java.sun.com/products/servlet/externa> l-resources.html
>
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to