On Nov 26, 2007 8:26 PM, Paul Spencer <[EMAIL PROTECTED]> wrote:

> Relative to testing EJBs inside a Maven executed JUnit test, any object
> instantiated by a class inside a JUnit test case is not "container
> managed" thus the  object will not receive the benefit of DI. EJB known
> to the embedded EJB container, ejbd in this case, and instantiated
> within that container will receive the benefit of DI, but the beans must
> be retrieve by the test class via a JNDI lookup.

Exactly. Nice we got it straightened out ;-) I wonder if we could
introduce a feature to help people run annotated tests. I think the
only way to achieve it would be to run the tests with a java agent
that would intercept test class loading. Any other ideas?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Reply via email to