During my days as a developer I have never become as hooked to something as when the TDD way of working found me. During development of a spring framework "managed" application it was evolved to an addiction. Coming back to JEE again 2 years ago got me really annoyed and the result is the following tooling.
I have now developed TDD with EJB3 (so has my team of developers) for 6months or so and perhaps even you can!?
The tooling is in Release Candidate condition, most APIs' are working as intended, but I do not support everything needed. Basically @EJB works and any service can be injected, also the @PostConstruct performs as intended.
The key values for this tooling are these
- Speed, the "boot" time of the Container should be close to zero. (aim was < 100ms)
- Automated "lifecyclehandling" of Container and DB-tx (clean up after tests)
- Minimal config for JEE server "services" (like JTA, DataSources)
- Very easy replace single EJB services during test execution (useful for mocking)
See the follow blogpost on the subject: http://alexandersson-robert.blogspot.com/2011/05/tdd-framework-for-ejb3.html
The jar can be found here http://code.google.com/p/injection-extensions/downloads/list
Maven dependency are synced to maven central and can be found in blogpost.