By default drone uses a session file. It is by default created in $HOME and it is not always useful. You can override it by a system property but if you don’t want such a file and can’t wait for the fix (should be in Drone 2) then you can write a small Arquillian extension to skip it:
TomEE embedded made several progresses recently and it is nice to use with Arquillian. Since it is fully integrated with Arquillian you can deploy 2, 3 or much more webapps in the TomEE embedded instance…but then you have an issue: CDI. CDI extension mecanism is based on Java ServiceLoader mecanism. It means it uses META-INF/services/* to load its extensions. The issue: TomEE embedded is embedded. Of course it shares its container classloader with all applications but in this case you’ll get in 90% of cases your extension as well (cause of Maven, gradle, …). So it means if you deploy your application with the desired CDI extension and another (a test one) where you don’t want them you’ll get trouble since the extension will be loaded.
How to avoid it?
TomEE arquillian adapters try to make test as isolated as possible but it means if you test a single application in N tests you’ll dump the application N times. For small apps no issue but for big ones it takes time.
To solve it several solutions exist.
TomEE embedded is great but until now it needed a real application to deploy to at least get web features (was possible to deploy ejb modules from classpath but then you don’t get Servlet/WebSocket/… features).
Now you can do it simply calling deployClasspathAsWebApp() method!
I spoke recently ( http://rmannibucau.wordpress.com/2014/08/06/tomee-and-more-advanced-resource-configuration/ ) of the ability to read using a custom API properties for TomEE resources but for enterprise context where you want to control all resources it was surely not enough for big applications.
To make it smoother to use you can now:
Since few weeks TomEE has some support for log4j2 without using log4j2-log4j compatibility module.
To set it up just add the log4j2 jars you want to tomee (lib/) and add your config – log4j2.xml – in the classloader (lib/ works too).
Side note: you can do it using a conf/jars.txt file and using log4j2 maven coordinates, really more easy ;).
Then in conf/system.properties (or in CATALINA_OPTS) set the system property openejb.log.factory to log4j2:
Then you’ll get the container logs redirected to log4j2.
OpenEJB/TomEE ApplicationComposer design is to describe a test application with an in memory model close to the xml EE one (Beans for beans.xml, EjbJar for ejb-jar.xml…).
But when it comes to CDI and since it was mainly designed for small apps it is hard to say “I have a CDI dependency/library”.
The more obvious use case is DeltaSpike!
To make it easier we added @Jars recently.