I'm still trying to figure out the cleanest way to zap an H2 database between tests while using OpenEJB as a local server and making use of OpenJPA's ability to generate the DDL for the database.
All of the EJBs under test will be using container-managed transactions. All tests will inherit from a common test class. Is there a (cheap, dirty, ugly) way within the superclass to get a handle on the *container* transaction in effect for a given test, so I can roll it back? I've tried grabbing the UserTransaction (an approach which of course is positively blissful in its complete disregard of the specification) and rolling it back, but of course I get an IllegalStateException telling me, quite rightly, that there is no UserTransaction associated with the current thread. Any suggestions to solve the larger problem are heartily welcomed. Best, Laird
