How Could I make spring should be singletton

How Could I make spring should be singletton

is it singleton = true or false

is it correct
LVL 9
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
 
mccarlConnect With a Mentor IT Business Systems Analyst / Software DeveloperCommented:
Spring beans are singletons by default, ie. no matter how many other beans reference a particular bean or how many lines of Java call .getBean() to a bean, there will only be ONE instance of that bean.

But they can be changed to return a new distinct instance for every reference or getBean() call by specifying scope="prototype" in the bean's definition.

Check out the documentation... http://static.springsource.org/spring/docs/current/spring-framework-reference/html/beans.html#beans-factory-scopes
0
 
RGRodgersCommented:
Your question is a little confusing, but check this out:

http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.