Question

It is possible to use Google Guice (any other DI framework) for injecting EJBs in Java EE 5? By default Java EE 5 uses JNDI to injecting EJBs.

Was it helpful?

Solution

I have no direct experience with Guice - but yes, it's possible to use other frameworks for injecting EJBs in a JEE5 application. For instance, Seam does just that. So in principle, it should be possible as there isn't an inherent restriction in the kind of objects that can be injected, as long as the framework takes care of all the lookup details.

UPDATE:

Take a look at this post detailing how to inject EJBs using Guice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top