Reputation: 4117
Is there one? Apparently not. The H2 automatic mixed mode is described here.
Upvotes: 1
Views: 612
Reputation: 22481
Revival for further reference.
As stated by @fredt, as far as I know, there is no official magic parameter to achieve mixed mode. Still, you can always start a server programmatically using a Server object so that other process are able to connect to your database.
I discovery a trick to accomplish something pretty close to mixed mode. In order to do that you will need to set the remote_open
property to true
and connect using this form of URL.
The idea here is doing something like this:
I'm not sure if it is safe to use that kind of pattern when you plan to spawn a lot of short lived processes (particularly I haven't dive into HSQLDB code to check how it handles database / creation / opening for multiple simultaneous requests when remote_open
is set). Still, I've been using this kind of pattern to share development databases between Web Applications for a while and never ran into a single database corruption problem.
The main limitation here is that when the application acting as a server is closed, open connections will stop working and throw Exceptions... Which is not an Issue for my development environment, here this will generally only means one or two broken requests until another server is started and the connection pool detects and renews its connections.
Upvotes: 1