This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Spring Singleton Bean Instantiation Mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring Singleton Bean Instantiation Mode" Watch "Spring Singleton Bean Instantiation Mode" New topic
Author

Spring Singleton Bean Instantiation Mode

Arya Pramod
Greenhorn

Joined: Jan 10, 2008
Posts: 12
Hi Everyone,

I am new to this forum. I had a doubt regarding Spring Singleton Bean Instantiation Mode.



As per Spring a Singleton is created for each bean defined in configuration.

What I am confused about it is
Does Spring create a Singleton instance for bean1 and also for bean2?

Or does Spring create a singleton instance for the Bean Type

Thanks In Advance,
Pramod
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Does Spring create a Singleton instance for bean1 and also for bean2?

Yes. One per declaration.


[My Blog]
All roads lead to JavaRanch
Arya Pramod
Greenhorn

Joined: Jan 10, 2008
Posts: 12
Thank You Christophe.
 
Don't get me started about those stupid light bulbs.
 
subject: Spring Singleton Bean Instantiation Mode
 
jQuery in Action, 3rd edition