• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dependency Injection works only in managed classes. What does this mean  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Dependency Injection is not supported in non managed clasess in EJB and web teir.

My doubt here is what they mean my mangaged classes

Thanks in advance
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Managed classes mean, the classes that are managed by the container. These can be Servlets, EJBs, JSF Backing beans etc. However, these cannot be Helper Classes that can be custom defined to provide for some specific functionality.

Since DI happens courtesy of the container, helper classes cannot access DI.

Hope this helps.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!