tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Problems getting EJB via annotation in test class.
Date Mon, 26 Nov 2007 18:31:49 GMT

On Nov 26, 2007, at 12:51 AM, Jacek Laskowski wrote:

> On Nov 25, 2007 11:09 PM, Paul Spencer <paulspencer@mindspring.com>  
> wrote:
>
>> Since the test is using OpenEJB as an embedded server, why is the  
>> test
>> class not considered as a DI target?
>
> if (test class == ejb class && test case == interceptor class) {
>  // the test class *is* a target of DI machinery
> }

Well the tricky thing about that statement is that if the "test class"  
is an ejb or interceptor, it's no longer a JUnit test class (i.e.  
something run by junit).  But the statement is correct in that you can  
put test *logic* in an ejb or interceptor which is deployed in the  
embedded container along with the app you'd like to test.

-David


Mime
View raw message