Losing context during my integration test of database
posted 3 years ago
I'm trying to write an integration test that queries an hsql database. I'm using hibernate/spring. My program seems to throw up on line 68. When I highlight query.getResultList() while I am debugging the test, it says:
query.getResultList() = >Exception occurred in target VM: org.hibernate.SessionException: Session is closed!<
It seems like I am losing the context. How do I reopen the transaction, or keep the transaction open so I can query the database?