I did some research on this matter but didn't find anything conclusive. I'm using a local HSQLDB
and here is how i'm connecting to this database:
Connection con = DriverManager.getConnection("jdbc:hsqldb:file:src/database/db", "SA", "");
I want to be able to make multiple connections. Why? I have two java applications. One is displaying data from this database (only reading) and the other is adding data to this database (reading and writting). I may need to have several instances of each application. But when a connection is already active and that I run a second instance of my app, it doesn't run and give me an error 10sec later:
Database lock acquisition failure: lockFile
Is there a way to achive this?
Start an HSQLDB Server with your database and connect to it from different processes:
http://hsqldb.org/doc/guide/running-chapt.html#rgc_hsql_server
Detailed information: