Subject | Re: [Firebird-Java] (newbie) Embedding firebird in a java app via jaybird(?) |
---|---|
Author | Roman Rokytskyy |
Post date | 2008-10-15T20:19:58Z |
Hi,
"Using Firebird client library
jdbc:firebirdsql:native:host[/port]:/path/to/db.fdb
jdbc:firebirdsql:native://host[:port]/path/to/db.fdb
Type 2 driver, will connect to the database using client library (either
fbclient.dll or gds32.dll on Windows, and libfbclient.so or libgds.so on
Linux). Requires correct installation of the client library.
jdbc:firebirdsql:local:/path/to/db.fdb
Type 2 driver in local mode. Uses client library as in previous case,
however will not use socket communication, but rather access database
directly. Requires correct installation of the client library.
Embedded Server
jdbc:firebirdsql:embedded:/path/to/db.fdb
Similar to the Firebird client library, however fbembed.dll on Windows
and libfbembed.so on Linux are used. Requires correctly installed and
configured Firebird embedded server."
So, in fact it is easy:
1. place the jaybirdXX.dll in the PATH (e.g. add the current directory
"." to your PATH)
2. set the FIREBIRD environment variable to point to the Firebird
Embedded installation (fbembed.dll is not enough - you need complete
intallation)
3. change the JDBC URL in your application
4. start Java
Should work. If it doesn't, try specifying the
-Djava.library.path=<path_to_jaybird_dll> parameter to JVM.
Roman
> I am trying to embed firebird in my java application for easyRelease Notes for Jaybird JDBC driver, page 10:
> deployment and to make the database transparent to the end user. As
> the embedded firebird server is done through .dll calls, I don't know
> if it's possible to embed firebird in a java app - I would assume it
> would be done through the jaybird JDBC driver, but I have not seen
> examples of it.
>
> Has anyone does this, does anyone know if this can be done? Are there
> examples out there? Could someone point me in the right direction?
"Using Firebird client library
jdbc:firebirdsql:native:host[/port]:/path/to/db.fdb
jdbc:firebirdsql:native://host[:port]/path/to/db.fdb
Type 2 driver, will connect to the database using client library (either
fbclient.dll or gds32.dll on Windows, and libfbclient.so or libgds.so on
Linux). Requires correct installation of the client library.
jdbc:firebirdsql:local:/path/to/db.fdb
Type 2 driver in local mode. Uses client library as in previous case,
however will not use socket communication, but rather access database
directly. Requires correct installation of the client library.
Embedded Server
jdbc:firebirdsql:embedded:/path/to/db.fdb
Similar to the Firebird client library, however fbembed.dll on Windows
and libfbembed.so on Linux are used. Requires correctly installed and
configured Firebird embedded server."
So, in fact it is easy:
1. place the jaybirdXX.dll in the PATH (e.g. add the current directory
"." to your PATH)
2. set the FIREBIRD environment variable to point to the Firebird
Embedded installation (fbembed.dll is not enough - you need complete
intallation)
3. change the JDBC URL in your application
4. start Java
Should work. If it doesn't, try specifying the
-Djava.library.path=<path_to_jaybird_dll> parameter to JVM.
Roman