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: Override annotations in ejb-jar.xml for a test case
Date Thu, 09 Oct 2008 09:30:53 GMT

On Oct 9, 2008, at 3:16 AM, Marcin Kwapisz wrote:

> Correct me if I am wrong: when ejb-jar is empty OpenEJB process all  
> class files (in classes and test-classes) and looks for annotated  
> EJBs. When ejb-jar is modified, OpenEJB process that file and looks  
> for annotated EJBs in test-classes only.

We look for annotated ejbs in classes/ if we find a classes/META-INF/ 
ejb-jar.xml file and the ejb-jar.xml file does not have 'metadata- 
complete' attribute set to 'true'.  Aside from the metadata-complete  
attribute, the contents of the ejb-jar.xml do not prevent searching  
for annotations or annotated ejbs.  The classes/ directory is treated  
as a single ejb jar and the contents of the classes/META-INF/ejb- 
jar.xml apply only to the beans in classes/.

The same rule applies for test-classes/.  Specifically, we look for  
annotated ejbs in test-classes/ if we find a test-classes/META-INF/ejb- 
jar.xml file and the ejb-jar.xml file does not have 'metadata- 
complete' attribute set to 'true' and the test-classes/ directory is  
treated as a single ejb jar, separate from classes/, and the contents  
of the test-classes/META-INF/ejb-jar.xml apply only to the beans in  
test-classes/.

Hope that helps.

-David


Mime
View raw message