Salut tout le monde,

I've problemes whith servlets that implements singlethreadmodel and
extends a superservlet (which holds static reference to a database)
it seams that i've more singlethread-servlets initialized and the static
variable is initialized by the first singlethreadservlet but each
client connect the same servlet :

public class SuperTargot extends HttpServlet {
        protected static  int SuperCounter = 1000;
        protected static   Sconn  Accessor=null

        public void init(ServletConfig config) throws ServletException
        {
                super.init(config);
                if (Accessor == null)
                             first time stuff
                         else stuff
        }

}

public class Targotin extends SuperTargot implements SingleThreadModel
{
        private TSession session=null;
        int sessionId=0;

        public void init(ServletConfig config) throws ServletException
        {
                        super.init(config);

        ++SuperCounter;
        sessionId=SuperCounter;
        session=new TSession(sessionId);

        public void doGet(HttpServletRequest request, HttpServletResponse response)
                                  throws ServletException, IOException
        {
                stuff ,stuff ............................................
                out.println("<H2> Session ="+session.sessionId+" </H2>");
        }


}


the output is always the same (the last initialized servlet) for all clients


I am running apache ApacheJServ-1.1.1-2 on a linux box with jdk1.2

and the zone properties file contain the line
tz.properties:  singleThreadModelServlet.initialCapacity=15

Any Suggestions would be nice

merci et excusez mon anglais merveilleux

___________________________________________________________________________
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