• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

instance pooling of servlet

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic