*
The moose likes Servlets and the fly likes creation of  5 object instances dynamically for a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "creation of  5 object instances dynamically for a servlet" Watch "creation of  5 object instances dynamically for a servlet" New topic
Author

creation of 5 object instances dynamically for a servlet

raghuram bikkani
Greenhorn

Joined: Jan 18, 2006
Posts: 16
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

Joined: Jan 10, 2002
Posts: 61654
    
  67

Unless you use a deprecated setting, there will be only one instance of a servlet per servlet declaration.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creation of 5 object instances dynamically for a servlet