Should we have instance variables in the Spring Bean which has been scoped as Singleton ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Should we have instance variables in the Spring Bean which has been scoped as Singleton ?Spring
Ans. No, if required we should only have final variables.Bean scoped singleton means that only one instance of the bean will be created and will be shared among different requests and hence instance variables will get shared too.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   singleton   spring framework   spring beans


Related Questions

  What are the benefits of using Spring Framework ?
  What are some differences between Spring caching and Hibernate caching?
  Q: What is default scope of bean in Spring framework?
  What the Bean scopes provided by Spring ?
 Tell us something about Spring framework ?
 What are the components of Spring framework ?
 What are the different ways in which dependency injection can be done using Spring Framework ?
 What is the difference between WebApplicationContext, ApplicationContext, DispatcherServlet, and rootContext in Spring framework?
 What are the features of Spring Framework ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: