File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

instance pooling of servlet

 
jak lodhi
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how many instance of servlet creates when 1000 of client's request
simultanuously strike for servlet , if one why ?. and when instance pooling ocurrs ?
[ May 16, 2006: Message edited by: jak lodhi ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Hareesh Dobbala
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only one instanse will be created for one servlet and for each request one thread will be started not instanse.
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multiples maybe created (This is an implementation detail of the Server you are on) if your servlet implements SingleThreadModel http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/SingleThreadModel.html

This should only be used if there isn't any better way to ensure your Servlet implementation is Thread Safe.
 
dema rogatkin
Ranch Hand
Posts: 294
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I heard that SingleThreadModel was depreceated, so servlet container providers may not support it anymore.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dema rogatkin:
I heard that SingleThreadModel was depreceated, so servlet container providers may not support it anymore.


That is correct.
Best to avoid using it.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/SingleThreadModel.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic