I've got a couple of questions concerning the integrated testing EJB 3.0 components using JUnit.
In your JUnit tests you can inject to session beans resource-local entity managers and therefore "simulate" ejb-container. But what if...
What if you need to test if transaction attributes on your ejb methods are handled properly? Can this be done outside the container? If not, what is the simplest way to test it inside the container?
What if you need to assure there are some test records in db before each test? How would you assure that after test execution (even if it fail) db is cleaned of test data?