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 RE: Override annotations in ejb-jar.xml for a test case
Date Thu, 09 Oct 2008 08:16:19 GMT
Hi,

> We don't have any functionality for supplying an alternate ejb-jar.xml
> for testing purposes.  It's not a bad idea and is something we might
> be able to add after we get the 3.1 release out the door.

[Marcin Kwapisz] 
My Maven2 profile is as follows. <resource> directs to folder src/test/resources/Toplink
(METAINF) where modified ejb-jar.xml and persistence.xml exist.
<profile>
            <id>TestEJB_Toplink</id>
            <activation>
                <property>
                    <name>env</name>
                    <value>testtoplink</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>toplink.essentials</groupId>
                    <artifactId>toplink-essentials-agent</artifactId>
                    <version>2.1-53</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>toplink.essentials</groupId>
                    <artifactId>toplink-essentials</artifactId>
                    <version>2.1-53</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>zsk.samples</groupId>
                    <artifactId>ToplinkExternalContainer</artifactId>
                    <version>1.0</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <resources>
                    <resource>
                        <directory>src/test/resources/Toplink</directory>
                    </resource>
                </resources>
            </build>
        </profile>

> This might be because the ejb-jar.xml is with the ejbs that are
> annotated.
[Marcin Kwapisz] 
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.

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




Mime
View raw message