Hi Neil,

It's not that your servlet is calling init 5 times, it's you've got 5
instances of your servlet, each calling init once!

>From your stack trace below, it seems that you (unknowingly?) had your
servlet implement SingleThreadModel, which means a new instance of your
servlet will be generated for each execution thread spawned by the servlet
container.  The upside to this is your servlet code can be thread-unsafe;
the downside is performance loss, excessive object instantiation, and in
your case, multiple calls to what you perceived as a "static, single"
initialization function!

Gene

----- Original Message -----
From: "Neil Harrison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 12, 2000 10:01 AM
Subject: Initialising Servlets - help please


> Apologies for re-posting this but i am getting pretty desperate!
> Any suggestions/solutions would be much appreciated. Cheers, Neil
>
> I have a problem with my servlets which seemingly are calling the init
> method 5 times as described below. I'm using IBMs Websphere V3.021. For
the
> time being my conn pool settings are: min(2), max(5). I'm running on
> Solaris 7, with WAS 3.0.2.1, Apache 1.3.9 and Oracle 7.
>
>
> The stdout log gives the following:
>
> Instantiate: searches/PopulateMaterialGroup
> 12913.231 1ef2af56 ServletInstan A Loading.servlet:."PopMatGrp" 12913.239
> 1ef2af56 WebGroup      A
> [Servlet.LOG]:."searches.PopulateMaterialGroup: init"
> 12913.604 1ef2af56 WebGroup      A
> [Servlet.LOG]:."searches.PopulateMaterialGroup: init"
> 12913.847 1ef2af56 WebGroup      A
> [Servlet.LOG]:."searches.PopulateMaterialGroup: init"
> 12914.378 1ef2af56 WebGroup      A
> [Servlet.LOG]:."searches.PopulateMaterialGroup: init"
> 12914.650 1ef2af56 WebGroup      A
> [Servlet.LOG]:."com.ibm.servlet.engine.webapp.SingleThreadModelServlet:
init"
> 12914.651 1ef2af56 ServletInstan A
> Servlet.available.for.service:."PopMatGrp"
> 12914.652 1ef2af56 WebGroup      A
> [Servlet.LOG]:."searches.PopulateMaterialGroup: init
>
>
___________________________________________________________________________
> 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

Reply via email to