Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Singleton Bean Instantiation Mode

 
Arya Pramod
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Spring create a Singleton instance for bean1 and also for bean2?

Yes. One per declaration.
 
Arya Pramod
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Christophe.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic