On May 8, 2008, at 10:22 AM, Gegas wrote:
Hello,
I really like embedded stuff. I got very excited when I heard
OpenEJB 3 was
released!
But, the thing is that I cannot get my unit tests with OpenEJB3 to
follow
Maven2 best practices.
The OpenEJB3 requires a ejb-jar.xml to exist in src/main/resources
to locate
my EJB's and if I'm using entity beans a persistence.xml must exist
in the
same directory.
What about the src/test/resources directory which is supposed to be
used by
testing?
And what about package and deplotyment for production. If my test
ejb-jar.xml and persistence.xml must be in src/main/resources then how
should I manage the "real" configuration files (those that should
reside in
src/main/resources).
When I package my ejb-jar it will contain configuration files used for
testing... bad...
Any thoughts on how to handle this issue?
Hi Andreas,
The intention was that the ejb-jar.xml and persistence.xml we test
would be the one you use in production. Obviously then it's perfectly
in line with Maven2 best practices.
I had never thought of having a seperate ejb-jar.xml just for testing
purposes, but it's certainly an interesting idea. Can you elaborate
on what you would do differently in the "test" ejb-jar.xml versus the
"production" ejb-jar.xml? Some sort of example would be good too.
-David