Hi,

> a H2 in-memory connection is created

It's actually a persistent database. You have used:
jdbc:h2:mem;DB_CLOSE_ON_EXIT=FALSE - this is a persistent database
with the file name mem.h2.db stored in the current working directory.
What you want is: jdbc:h2:mem:;DB_CLOSE_ON_EXIT=FALSE (a colon after
mem).

If this is still a problem for you, you may want to open and close a
persistent database before creating the class loader. I'm not fully
sure, but as far as I know, the class loader is not unloaded if a
class that is loaded by it has a static final field with a class
loaded by this class loader. From my experiment, if I open and close a
connection at the beginning of the program (so that all needed classes
are loaded by the regular class loader and all static fields are
initialized), then your test case works.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to