I use Wildfly and added a datasource to it with the connection URL jdbc:h2:mem:test. The data is however lost when my Enterprice-app is shut down. I then tried to make H2 file based, by adding a datasource with the connection URL jdbc:h2:~/test. I then got this error:
"WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid"
So how can I add a file-based H2-datasource to Wildfly?