On Wed, Sep 28, 2011 at 12:28 AM, Marina Vatkina
<marina.vatkina_at_oracle.com>wrote:
> Why wouldn't it be invalidated when EMF is closed by the container?
>
It probably is. The problem is that (contrary to my earlier assumption) the
container actually sticks around between test method invocations.
So the revised workflow is:
Create test case
Create (or reattach to) database
Create container
For each test method:
clean test database
ensure test database tables exist and are valid
populate test database
run test
Shut down container
Shut down database
The session cache therefore persists between test method invocations.
Thanks,
Laird
--
http://about.me/lairdnelson