----- Original Message -----
From: "Charles Chen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 10, 2000 6:34 PM
Subject: Re: [Emer.] ServletContext Problem in JRun 3.0!!!! [Scanned by Yellow Pages 
PostMaster]


>
> Contact:   Tel: 2726  -  New Media Systems, 1st Floor South, Queens Walk
>
>
> This might not anwser your question directly but...
>
> Although you created 10 servlets running threads, you have only one copy of
> (req, res). For that you might want to synchronize at least the use of the res
> objects? Don't know what is done inside each servlet but if they change anything
> in servlet context, you will run into problems?
>
>
> Cheers,
>
>
> Charles
>

Here is one of WorkingServletX source.
Number is from 1 to 10.

public class WorkingServlet1 extends HttpServlet
{
 public void doGet (HttpServletRequest req, HttpServletResponse res)
         throws ServletException, IOException
     {
      PrintWriter out = res.getWriter();
      int waitTime = Integer.parseInt(req.getParameter("waittime"));

      try
      {
       Thread.sleep((long)waitTime * 1000);
      }
      catch(Exception e) {}

      out.write("<br><b>This line is written by Servlet1 !</b>");
      out.flush();
     }
}

each WorkingServetX doing is not inportant.....
Important thing is all WorkingServletX are not initialized...only i using JRun...

___________________________________________________________________________
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