tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Spencer <paulspen...@mindspring.com>
Subject Re: Problems getting EJB via annotation in test class.
Date Mon, 26 Nov 2007 11:53:38 GMT

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
> } else {
>   // do nothing with it, just load the class and provide to other
> classes with no DI-related changes
> }
>

I need to think about this.  I start a new thread if I have questions.

>> My intent is to test the EJB in the same manor as an application would
>> use the EJB.  This includes the use of DI.  Is my implementation
>> consistent with my intent?
> 
> Have you considered checking out the openejb examples from
> http://svn.apache.org/repos/asf/openejb/trunk/openejb3/examples/?
> Unless you have, I'd strongly recommend doing so as there're quite a
> few examples of how ejbs look like and work in openejb. There's
> nothing specific to openejb in them so they should work in other ejb
> containers with no changes. You can read about them  on
> http://openejb.apache.org/examples.html. If you're not satisfied with
> them, write what you're after and I'll create one for you (consider it
> a New Year present ;-))

I have attached a modified version of the EjbDependencyTest that 
illustrates how I want to test my EJBs.

> 
> Jacek
> 

Thank you,
Paul Spencer


Mime
View raw message