This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ramakrishna kulkarni
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
 
Prasad Shindikar
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic