[geotk] [JIRA] Created: (GEOTK-13) Embedded EPSG database can not be shared by different JVM on the same machine

Martin Desruisseaux (JIRA) jira at geomatys.com
Thu Jun 11 06:53:57 EDT 2009


Embedded EPSG database can not be shared by different JVM on the same machine
-----------------------------------------------------------------------------

                 Key: GEOTK-13
                 URL: http://jira.geotoolkit.org/browse/GEOTK-13
             Project: Geotoolkit
          Issue Type: Bug
          Components: Referencing
    Affects Versions: 3.00, 3.01
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux


The first Java application fetching a connection to the embedded EPSG database gets a lock on that database. Concurrent multi-thread access to that database work well (this is tested in {{StressTest}} during Maven build), as long as all requests come from the application that started JavaDB. However if an other application - in its own JVM - is started, it can not access the EPSG database because of the lock.

There is many possible solutions to explore:

* In Glassfish environment, maybe a JavaDB instance is running for all applications? Is so we should use that instance.
* In any environment (Glassfish, Tomcat...), if the user has a PostgreSQL database anyway (typically for PostGIS geometries), use that database. Note that {{geotk-epsg}} is capable to install an EPSG database on PostgreSQL now.
* Declare the EPSG database as read-only, so there is no need for lock. This is what we did with HSQL, but I have not found an equivalent functionality in JavaDB.
* Put the database (in its binary form) straight in the JAR file. This is what Derby call "_embedded database_", but the result is a bigger JAR file than putting the SQL scripts and is not executable on other databases like PostgreSQL. I would also expect an overhead caused by the need to uncompress the JAR file content.
* For all other cases, we may provide an option for starting JavaDB in server mode and get all applications to run as clients.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.geotoolkit.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the Geotoolkit mailing list