Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

different between two types of beans

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know what is the different between this two types?
both gives a singleton bean?





 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would kind of depend on how com.springinaction.springidol.Stage.getInstance() is coded, wouldn't it?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but normally we taking about factory in singl object.
isn't it?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really. One of the points of having factories is to hide the details of object instantiation, so we either don't, or shouldn't, or can't, concern ourselves with details like whether the object being retrieved is a singleton or not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic