On 12-08-2020 22:42, Adam McMahon wrote:
> You instructions for Windows embedded worked perfectly. Thanks! A few
> follow up questions:
>
> [1] Your graddle example uses a trimmed down collection of dlls and
> files, but is there any danger of just pointing the JNA path to a
> standard FB install folder (as opposed to a trimmed down one)? In my
> quick test, it seems to work when pointing to the standard FB install
> folder.
That works just fine, but trimming down allows you to reduce space and
lock things down more (as in, not giving your users unnecessary
executables).
In fact, usually when I run the Jaybird tests for Embedded, I just point
the jna.library.path to a Firebird installation directory.
You may also want to edit the Providers setting in firebird.conf to only
Engine12 if you need to prevent it from making remote connections.
> [2] what is the String literal name of the embedded driver? I like to
> catch problems early by calling, Class.forName(), but I can't find the
> String literal name of driver.
Jaybird has a single driver class, and that is
org.firebirdsql.jdbc.FBDriver, the various types (PURE_JAVA, OOREMOTE,
NATIVE, LOCAL and EMBEDDED) are loaded internally.
See also:
-
https://firebirdsql.github.io/jaybird-manual/jaybird_manual.html#connection-drivermanager
-
https://firebirdsql.github.io/jaybird-manual/jaybird_manual.html#driver-types
-
https://github.com/FirebirdSQL/jaybird/blob/master/src/main/org/firebirdsql/gds/impl/GDSFactory.java
Know that since Java 6 you don't really need to explicitly load a JDBC
driver using Class.forName anymore, unless the driver is not on the
initial classpath (eg if the driver is in WEB-INF/lib of a WAR, but in a
web applications it is usually better to use a configured
javax.sql.DataSource anyway). DriverManager takes care of automatically
loading JDBC drivers on the initial classpath.
Mark
--
Mark Rotteveel