Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servelet instances created in web.xml

 
Sheethal Shenoy
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have
<servlet>
<servlet-name>notify</servlet-name>
<servlet-class>org.diabetes.phd.PHDNotify</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>notify</servlet-name>
<url-pattern>notify.phd</url-pattern>
</servlet-mapping>

in my web.xml in weblogic 7.0 .But on startup i get 2 instances on the servlet.Irrespective of <load-on-startup> is 0 or 1 i get 2 instances on the servlet.Could anyone explain this behaviour.I would appreciate any help
Thanks
Sheets
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it implementing SingleThreadModel?
 
Wasim Ayoubi
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

load on startup does have nothing to do with the number of servlet instances created by the container.

as told before, check if your servlet code implements the SingleThreadModel interface.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic