On Aug 18, 2009, at 6:12 PM, Laird Nelson wrote:
I have a unit test that I'm trying to annotate and get rolling with
the
@LocalClient annotation.
I have a provisional persistence.xml in that project, in
src/test/resources/META-INF, and an empty
src/test/resources/META-INF/application-client.xml file as well (to
trigger
discovery).
Unfortunately, OpenEJB seems to decide that because the
application-client.xml file is there, the project is a Client
Module, and so
doesn't recognize that it's also a Persistence Module.
If I remove the application-client.xml file, then the
persistence.xml file
is discovered, but now my test class is not injected.
Both "ClientModules" and "EjbModules" can use the @LocalClient
annotation. Use an empty ejb-jar.xml instead of an empty application-
client.xml and all should work with your persistence.xml.
-David