1 Reply Latest reply on Apr 9, 2004 2:51 AM by Frode Halvorsen

    Multiple instances of servlet

    Andrew Yudin Newbie

      Hi all

      A use JBoss 3.2.3(include Tomcat 4.1.29).
      By default Tomcat web container uses one instance of servlet per many requests. I can't use SingleThreadModel for my servlets because It does not approach for my problem.

      In Servlet Specification Version 2.4 I have found:
      For a servlet not hosted in a distributed environment (the default), the servlet container must use only one instance per servlet declaration.
      In the case where a servlet was deployed as part of an application marked in the deployment descriptor as distributable, a container may have only one instance per servlet declaration per Java Virtual Machine (JVM TM). (MY CASE)

      Whether is it possible to force JBoss(Tomcat web container) to use new instance of servlet for each http request. (for each new http request create new servlet instance)?