File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes SEAM question about specifying scope of injected components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "SEAM question about specifying scope of injected components" Watch "SEAM question about specifying scope of injected components" New topic
Author

SEAM question about specifying scope of injected components

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Reading the seam book, it says that if I don't declare a scope for an injected component, Seam searches all scopes hierarchically looking for a non-null component by that name. My question is, is it best practices to always specify a scope so that seam doesn't have to do all that searching. With hundreds of components and hundreds of injections, wouldn't this impact performance?
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

I can answer this myself now. The context variables are stored in maps and it is a very cheap effort to check these maps, even with hundreds of components. Not the first place to begin checking for places to improve performance.
 
 
subject: SEAM question about specifying scope of injected components