File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 14687
    
  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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Singleton Bean Instantiation Mode
 
Similar Threads
how to define multiple beans
Newbie Singleton Enforcement Question
Need to get the current Instance of one backing bean into another
BeanUtils and null-properties.
how to extract Bean ID in java for JMX