Meaningless Drivel is fun!*
The moose likes Spring and the fly likes different between two types of beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "different between two types of beans" Watch "different between two types of beans" New topic
Author

different between two types of beans

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I need to know what is the different between this two types?
both gives a singleton bean?





David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That would kind of depend on how com.springinaction.springidol.Stage.getInstance() is coded, wouldn't it?
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
but normally we taking about factory in singl object.
isn't it?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: different between two types of beans
 
Similar Threads
Spring - Multiple IoC Containers with Singleton Bean in a JVM
Need help.....
Spring Singleton Bean Instantiation Mode
Making a bean as Stateful using spring
SPRING - Sharing singleton with prototype - Possible?