• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creation of 5 object instances dynamically for a servlet

 
raghuram bikkani
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how we create 5 object instances dynamically for a servlet?suppose if creation is possible dynamically, i make a request to that servlet which object instance will give to me?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you use a deprecated setting, there will be only one instance of a servlet per servlet declaration.
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt about deprecated api. Servlet specification has deprecated just SingleThreaded class. Loading multiple instance is fine as long as synchronization is take care in the servlet. Setting the number of servlet to be loaded is specific to application server. For eg: WebLogic has something like single-threaded-servlet-pool-size. Correct me if I am wrong.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic