Forums Register Login

dependency injection on distributed containers

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send

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
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1096 times.
Similar Threads
Pluggable Components
Defination of Spring wiring
passing beans..
Inversion of control
constructor misuse ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:10:31.