Question

Please bear with me, my knowledge of database concurrency and servers is very small.

The problem:

I'm working on a project that consists of a java application using an embedded H2 database. To date, this has been implemented and works as a standalone jar. However, the application will need to be setup on a terminal server for use by multiple users in a small network. This is where my lack of knowledge gets me in a pickle. Will setting the H2 up as MIXED_MODE and using synchronisation techniques in my Java application suffice or will I have to do something else?

Please let me know if this is not clear enough. If anyone has any tutorials they could point me toward that would be great.

Thanks.

Was it helpful?

Solution

I'm not absolute sure how it works with a terminal server, but in general:

You have to start h2 in server mode and connect every client via jdbc to the server. So install the server on one machine and configure your client application to connect to the server. If the client is started twice every client connects remotely to the server via tcp/ip

http://www.h2database.com/html/tutorial.html#using_server

The mixed mode is a special variant of server mode and embedded mode. But if you start a client you don't want to start the server with the second client again.

So, try the server mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top