Open
Description
Is your feature request related to a problem? Please describe.
Follow-up to #1140.
For the greatest amount of deployment safety, I have configured my application to use a static copy of sqlitejdbc.so
via -Dorg.sqlite.lib.path
that gets deployed alongside the application. There are however some issues with this approach:
- The cleanup routine gets run every time, even though the JDBC native lib will never be present there - this adds startup time that is variable as it depends on the number of items that happen to be at
/tmp
at any given time - Logging is not sufficient and therefore if the
org.sqlite.lib.path
option is misconfigured, it is not easy to identify. That is to say, if the JDBC native lib is missing, or if thelib.path
is incorrect, then it silently fails and falls-back to loading from the JAR resources (and using/tmp
) and there is no indication that this has happened.
Describe the solution you'd like
Make the default to load from JAR resources, but allow users to explicitly specify (e.g., -Dorg.sqlite.lib.location
) where the native JDBC lib should be loaded from. If it cannot be loaded, the behavior should be to fail-fast, not fall-back.
Added logging (at least DEBUG, maybe INFO) where the Native JDBC lib file is loaded from.