Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Creation & Usage

 
Shankar Narayana
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an web based application in which the servlet creates the instances of beans in its init() method. As far as I know there will be only one instance of servlet and the beans throughout the application. Does this have any effect of the application performance depending upon the no. of users?.

Regards,
Shankar
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends whether different threads (from different requests) have to contend for exclusive access to any resources used by the servlet and/or beans.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic