Hi, > I wanted the H2 to run in a different process > 1. In order to start my application I have to first start the H2 > server (using a .bat file or the start menu) and only then I can start > my application. > Is there a way to start the H2 database when my application starts? > (Either by using the Spring configuration files or any other way – I > don’t want to do it manually, and I don’t want to add additional Java > code to do that if there are alternatives)
To start a different process within a Java application, use Runtime.exec. You could also start H2 as a service: http://www.h2database.com/html/advanced.html#windows_service > 2. Is there a way to initialize the database schema on my application > startup using a script? Yes, use RUNSCRIPT: http://www.h2database.com/html/grammar.html#runscript > 3. When I delete several rows by using the command “delete from XXX > where a > 123” – does it always lock the entire table? Is there a way > to allow other threads to insert rows to this table? Yes, see: http://www.h2database.com/html/advanced.html#transaction_isolation http://www.h2database.com/html/advanced.html#mvcc 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 -~----------~----~----~----~------~----~------~--~---
