aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes dependency injection on distributed containers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "dependency injection on distributed containers" Watch "dependency injection on distributed containers" New topic
Author

dependency injection on distributed containers

Charles Ohene
Greenhorn

Joined: Dec 27, 2005
Posts: 12
Hi out there, is it possible to use DI (dependency injection) from a JSF-Managed Bean to access an ejb, if the WebApp is deployed on another server than the EjbApp? Or do I have to use the classical ServiceLocator pattern and configure the lookup by myself?

Thanks for any help and kind regards,
Charles.
Ana Gari
Greenhorn

Joined: Aug 19, 2011
Posts: 7

Are you asking the possibility of using dependency injection in JSF managed beans to access EJBs ? If so, yes, you can.
JSF managed beans support the dependency injection feature. JSF components running in Web container (Java EE 5) can access the components running in EJB container
thro’ dependency injection without requiring to use JNDI look up as web container is aware of annotations. The following articles will explain the same

http://java.sun.com/developer/technicalArticles/J2EE/injection/

http://www.capcourse.com/Library/JSF+EJB/JSF+EJB_50.pdf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dependency injection on distributed containers