----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
> > > PS: does your servlet implement SingleThreadModel ?
> > No, and that's the weird thing about this - there's a maximum of two
> > (2!) threads running concurrently (DoubleThreadModel? ;)
> > So what can I do? I've heard that JServ has great performance, and I'm
> > kind of relying on it...
> upgrade, and test. if the same thing happens, have a critical look ar
> your code ;-)
Okay, so now I've recompiled the latest JServ (1.1b3) with Apache and I'm
still only getting two concurrent threads! What's wrong?!
servlet:
---------------
public class JServTest extends HttpServlet
{
private static String LOG_FILE_NAME = "/tmp/jserv_test_log";
private static PrintWriter log;
static {
try {
log = new PrintWriter(new FileOutputStream(LOG_FILE_NAME));
} catch (IOException e) {e.printStackTrace();}
}
/**
* Get function.
*/
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
HttpSession session = req.getSession(true);
String sessionID = session.getId();
log.println("Start..."+new Date().toString()+" "+sessionID);
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("Running "+sessionID);
try {
Thread.sleep(5000);
} catch (Exception e) {}
log.println("Finished..."+new Date().toString()+" "+sessionID);
log.flush();
session.invalidate();
}
}
---------------
Regards,
Faik Siddiqi
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]