A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Frameworks
»
Other Application Frameworks
Author
Spring Singleton Bean Instantiation Mode
Arya Pramod
Greenhorn
Joined: Jan 10, 2008
Posts: 12
posted
Jan 21, 2008 21:52:00
0
Hi Everyone,
I am new to this forum. I had a doubt regarding Spring Singleton Bean Instantiation Mode.
bean id="bean1" class="com.test.Bean1" bean id="bean2" class="com.test.Bean1"
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: 14672
11
I like...
posted
Jan 21, 2008 22:42:00
0
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
posted
Jan 22, 2008 00:18:00
0
Thank You Christophe.
I agree. Here's the link:
http://aspose.com/file-tools
subject: Spring Singleton Bean Instantiation Mode
Similar Threads
BeanUtils and null-properties.
how to define multiple beans
how to extract Bean ID in java for JMX
Newbie Singleton Enforcement Question
Need to get the current Instance of one backing bean into another
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter