>From the h2 docs here:
http://www.h2database.com/html/features.html#in_memory_databases

In some cases, only one connection to a in-memory database is required.
This means the database to be opened is private. In this case, the database
URL is jdbc:h2:mem: Opening two connections within the same virtual machine
means opening two different (private) databases.

Sometimes multiple connections to the same in-memory database are required.
In this case, the database URL must include a name. Example:
jdbc:h2:mem:db1. Accessing the same database using this URL only works
within the same virtual machine and class loader environment.

So, if you use a connection url of "jdbc:h2:mem:" AND you make sure to call
registry.cleanupThread() in the @After of each test. You will get a new
database for every test.

Reply via email to