How Could I make spring should be singletton

Posted on 2012-09-01
Last Modified: 2012-09-04
How Could I make spring should be singletton

is it singleton = true or false

is it correct
Question by:stmani2005
    LVL 8

    Expert Comment

    Your question is a little confusing, but check this out:
    LVL 35

    Accepted Solution

    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...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now