This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Dependency Injection works only in managed classes. What does this mean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Dependency Injection works only in managed classes. What does this mean" Watch "Dependency Injection works only in managed classes. What does this mean" New topic
Author

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

ramakrishna kulkarni
Greenhorn

Joined: Feb 06, 2009
Posts: 14
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

Joined: Feb 18, 2007
Posts: 114
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.
 
Have you checked out Aspose?
 
subject: Dependency Injection works only in managed classes. What does this mean
 
It's not a secret anymore!