Hello,
I find myself struggling with creating a consistent configuration for my
application.
What I mean, for me building JavaEE Applications mean JavaEE, TomEE,
OpenEjb, OpenJpa, OpenWebbeans, some Jsf impl.,
openejb.ApplicationComposer/Arquillian/JUnit, maven.
AND, I need to be able to execute my app in two modes - 1. productive,
2. test.
What I currently am struggling with, is to build a consistent and clear
configuration for my application. I see that my config is distributed among
- maven plugins;
- JavaEE config files in META-INF in both src/main and src/test
- tomee.xml;
- openejb.xml;
- unittestcode (for ApplicationComposer/Arquillian)
- jvm -D properties
Why is it this way? Well, because I am unable to make it work in one place!
Just yesterday I had the case where I needed some openejb.* property to
be set. jvm -D didn't worked for me, then I tried to figure out how to
put it into openejb.xml (since in docu was written that I should place
it there), then I recalled that tomee.xml has also some openejb.*
properties, but then I recalled that I don't have tomee but rather
embeded(?) openejb container launched by ApplicationComposer, so I ended
adding openejb.* property to @Config method of my unittest ran with
ApplicationComposer.
Another case was with JPA entities. I don't know what of my config is
superfluous, but currently I have my entities added to
- @Module public PersistenceUnit persistenceConfig()
- persistence.xml
- openjpa-maven-plugin
This is just too much config for my taste :)
Does any of you guys have a clear picture in your mind on how config for
the two modes (productive and test) shall be done and what things go
where? Would you care to share this picture with me?
kind regards
Reinis