*
The moose likes Spring and the fly likes Injecting Scoped 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 "Injecting Scoped Beans" Watch "Injecting Scoped Beans" New topic
Author

Injecting Scoped Beans

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Why do we need to specify a proxy when we inject a scoped bean into another bean?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

To some extent I can make out that we need a proxy in case of session, request and global session scoped beans. But why not for a prototype scoped bean? I guess when we inject a prototype scoped bean in a singleton, we need the proxy to get to the original new instance of the prototype bean. Am I right?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Injecting Scoped Beans
 
Similar Threads
How to destroy the Object of a SessionScoped bean
Caching in application scope JSF managed bean
Is it possible to retrieve request parameters through pageContext ?
onload function
How t:datatable works and when bean will be initialised?