aspose file tools*
The moose likes Servlets and the fly likes instance pooling of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "instance pooling of servlet" Watch "instance pooling of servlet" New topic
Author

instance pooling of servlet

jak lodhi
Greenhorn

Joined: May 16, 2006
Posts: 6
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

Joined: Dec 11, 2004
Posts: 13410

One


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Hareesh Dobbala
Greenhorn

Joined: May 19, 2006
Posts: 1
Only one instanse will be created for one servlet and for each request one thread will be started not instanse.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
I heard that SingleThreadModel was depreceated, so servlet container providers may not support it anymore.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: instance pooling of servlet