Mary, I'm not sure why you are using the SingleThreadModel. As long as you keep you use method local variables and don't use class instance variables, you should be thread-safe. Are any exceptions occurring which would cause the thread to exit? See what happens when you don't use single thread model.
-Richard
At 07:06 AM 8/24/2004, you wrote:
We are using JRun 3.1 on Windows 2000, and have a servlet that runs a web questionnaire. It instantiates a class (once) for the session, which looks up datasource for pooled connection to db. When the user presses "next" after each question, the servlet is called again as the action for the "next" (submit) button. In effect, posting to itself. For each question, the servlet tells the datasource to grab a conn, record answer, get next question from database, and then closes it (returns to pool).
The servlet class implements SingleThreadModel, so I understand that JRun may make more than one copy when service is needed by more than one user. But the most users I have ever noted at one time is 3, and I often see in event log that "init" is called multiple times in a row, sometimes as many as 10 - 18, within seconds of each other. Each time init is called, there is also request for new connection from the pool. This seems to loosely correalate with other errors, such as multiple blocks of "Connection reset by peer: JVM_recv in socket input stream read [java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read]..."
I do not understand why "init" is being called so many times, and if this is leading to the multiple "connection reset by peer statements", socket closed, and other strange errors I see in event log. They do all seem to happen around the same time. It is not consistent, as at other times I see init being called maybe 1-3 times as users log on, with no problems. Could a firewall at a user's site issue be causing any of this?
I would appreciate any thoughts about what might be causing init to be called so many times in a row.
Thanks in advance, Mary
___________________________________________________________________________ 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
___________________________________________________________________________ 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