Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does Singletone ServiceLocator creates bottleneck for applications?  RSS feed

 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does singleton ServiceLocator degrads performance of application or does it creates bottleneck when there are more than 100 users concurrently access applicaion?
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Singleton won't degrade the performance in this case, if you use servlet or struts to access service locator. Because each request will be in separate thread and as long as your Service Locator methods are not synchronized, it won't affect application.

HTH.
 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prabhu,

Thanks for reply.

If I access ServiceLocator from stateless SessionBeans then will it affect performance? To my knowledge it should not because statelss session beans are pooled by application server.


Regards

Rajesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!