Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.2.M7
    • Fix Version/s: UDIG 1.2.M7
    • Component/s: framework
    • Labels:
      None

      Description

      As part of going through the dependencies we have the chance to use a different pure java database for our EPSG authority information. Previously we have used the much loved HSQL database - that is very common in java projects; but lacks Transaction independence. This prevents the HSQL database from being a good choice for a local java DataStore.

      Recent jdbc-ng work has produce a H2DataStore implementation that would be nice to try out; offering transaction independence etc.. (indeed h2 seems to be hsql version 2).

        Issue Links

          Activity

          Hide
          Jody Garnett added a comment - - edited
          Change applied to trunk - moovida reports the following issue:

          !MESSAGE While loading class "org.h2.message.Message", thread
          "Thread[Finalizer,8,system]" timed out waiting (5000ms) for thread
          "Thread[main,5,main]" to finish starting bundle
          "net.refractions.udig.libs_1.2.0 [41]". To avoid deadlock, thread
          "Thread[Finalizer,8,system]" is proceeding but
          "org.h2.message.Message" may not be fully initialized.
          !STACK 0
          org.osgi.framework.BundleException: State change in progress for
          bundle "update@../WORKSPACES/jgrass4udigtrunk/udigTrunk/trunk/plugins/net.refractions.udig.libs/"
          by thread "main".
                 at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1073)
                 at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:278)
                 at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
          [...]
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                 at org.h2.message.Message.<clinit>(Message.java:36)
                 at org.h2.engine.Session.finalize(Session.java:279)


          Basically the first time you run it an SQL script is called to create and populate a database; since this takes longer then 5000 milliseconds we get a warning (is the process killed?).

          By default gt-epsg-h2 will create a database in:
          - C:\Users\jodyg\AppData\Local\Temp\Geotools\Databases\EPSG-H2-7.1.0

          An issue the following feedback to stout:
          Creating cached EPSG database version 7.1.0. This operation may take a few minutes...


          In response to this I have:
          - packaged up the H2 database produced by the SQL script as part of net.refractions.udig.libs/epsg
          - in the activator I now set a system property pointing at the above directory
          - this avoids the setup cost; at a cost of around 40megs! Admittedly we will zip up this result; but it will not compress as well as the raw SQL

          The alternative is to start up a separate thread to unpack the database ... possibly with a progress monitor? I am going to ask moovida if the above solution (now committed) works first.
          Show
          Jody Garnett added a comment - - edited Change applied to trunk - moovida reports the following issue: !MESSAGE While loading class "org.h2.message.Message", thread "Thread[Finalizer,8,system]" timed out waiting (5000ms) for thread "Thread[main,5,main]" to finish starting bundle "net.refractions.udig.libs_1.2.0 [41]". To avoid deadlock, thread "Thread[Finalizer,8,system]" is proceeding but "org.h2.message.Message" may not be fully initialized. !STACK 0 org.osgi.framework.BundleException: State change in progress for bundle "update@../WORKSPACES/jgrass4udigtrunk/udigTrunk/trunk/plugins/net.refractions.udig.libs/" by thread "main".        at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1073)        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:278)        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408) [...]        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)        at org.h2.message.Message.<clinit>(Message.java:36)        at org.h2.engine.Session.finalize(Session.java:279) Basically the first time you run it an SQL script is called to create and populate a database; since this takes longer then 5000 milliseconds we get a warning (is the process killed?). By default gt-epsg-h2 will create a database in: - C:\Users\jodyg\AppData\Local\Temp\Geotools\Databases\EPSG-H2-7.1.0 An issue the following feedback to stout: Creating cached EPSG database version 7.1.0. This operation may take a few minutes... In response to this I have: - packaged up the H2 database produced by the SQL script as part of net.refractions.udig.libs/epsg - in the activator I now set a system property pointing at the above directory - this avoids the setup cost; at a cost of around 40megs! Admittedly we will zip up this result; but it will not compress as well as the raw SQL The alternative is to start up a separate thread to unpack the database ... possibly with a progress monitor? I am going to ask moovida if the above solution (now committed) works first.
          Hide
          Jody Garnett added a comment -
          Database unpacked as of -r31427

          Please mark this issue as closed; or pass it back to me if you would like to try out creating the database in a separate thread? I went with unpacking the database as that provides a faster initial start; and thus a better first impression (although that is up for debate give a change in download size?).
          Show
          Jody Garnett added a comment - Database unpacked as of -r31427 Please mark this issue as closed; or pass it back to me if you would like to try out creating the database in a separate thread? I went with unpacking the database as that provides a faster initial start; and thus a better first impression (although that is up for debate give a change in download size?).
          Hide
          Jody Garnett added a comment -
          Tried out testing the database directory; and starting up a separate job as of -r 31428. You will need to run refresh.xml in order to get the new method on ThreadedH2EpsgAuthroity
          Show
          Jody Garnett added a comment - Tried out testing the database directory; and starting up a separate job as of -r 31428. You will need to run refresh.xml in order to get the new method on ThreadedH2EpsgAuthroity

            People

            • Assignee:
              Andrea Antonello
              Reporter:
              Jody Garnett
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: