Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.2 branch
-
None
Description
Embedded HSQLDB creates a number of concurrency problems - two or more instances of the Modeler can't use the same DB; when a Modeler is killed via kill -9, the DB lock is not cleaned; fresh preferences updates are not picked up by the local apps using cayenne "JNDI emulation" mode, etc.
Suggested improvements:
- Issue SHUTDOWN periodically (most likely by closing the connection pool and using "shutdown=true" URL property, so it will be transparent to Cayenne)
- When a DB is locked we create a copy of it so that the Modeler can still run. But then if the preferences are saved to this copy, they never make it to the master instance. Improve that by presenting "unlock preferences" dialog when a user attempts to edit preferences on the copy. If a users selects "yes, unlock", an attempt will be made to delete the lock on the master DB and take it over.