tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcin Kwapisz" <mkwap...@zsk.p.lodz.pl>
Subject Override annotations in ejb-jar.xml for a test case
Date Mon, 22 Sep 2008 10:33:15 GMT
Hi,

I would like to add an interceptor to my EJB but only in a test. I have separate ejb-jar.xml
for tests and all my EJBs are annotated. When ejb-jar.xml is empty everything works fine.
When I change ejb-jar and add for example:

<assembly-descriptor>
        <interceptor-binding>
            <ejb-name>StudentEndpointBean</ejb-name>
            <interceptor-class>pl.zsk.sos.interceptor.TestInterceptor</interceptor-class>
        </interceptor-binding>
    </assembly-descriptor>

automatic configuration does not find my EJBs and I get javax.naming.NameNotFoundException

How can I override annotations or change configuration for my test case? Can it be done in
a test code? 

Regards
-- 
Marcin Kwapisz
Division of Computer Networks
Technical Univeristy of Lodz, Poland



Mime
View raw message