• Post Reply Bookmark Topic Watch Topic
  • New Topic

SEAM question about specifying scope of injected components  RSS feed

 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!