Skip to content

Jaybird Information

Mark Rotteveel edited this page May 2, 2020 · 3 revisions

Jaybird is a JCA/JDBC driver suite to connect to Firebird database servers.

This driver is based on both the JCA standard for application server connections to enterprise information systems and the well-known JDBC standard. The JCA standard specifies an architecture in which an application server can cooperate with a driver so that the application server manages transactions, security, and resource pooling, and the driver supplies only the connection functionality. While similar to the JDBC XADataSource concept, the JCA specification is considerably clearer on the division of responsibility between the application server and driver.

Supported Firebird versions

Jaybird 4

Jaybird 4 was tested against Firebird 2.5.9, 3.0.5 and a recent snapshot of Firebird 4. Earlier versions are not supported.

Formal support for Firebird 2.0 and 2.1 has been dropped. The Type 2 and embedded server JDBC drivers use JNA to access the Firebird client or embedded library.

Notes on Firebird 4 support

The new data types introduced in Firebird 4 - DECFLOAT, TIME WITH TIME ZONE, TIMESTAMP WITH TIME ZONE and NUMERIC/DECIMAL with a precision between 19 and 38 - are supported.

Jaybird 4 supports the Firebird 4 zlib compression.

Jaybird 4 does not support the Firebird 4 Chacha wirecrypt plugin.

Jaybird 4 does not support the new batch protocol.

Notes on Firebird 3 support

Jaybird 4 supports the Firebird 3 zlib compression.

Jaybird 3

Jaybird 3 was tested against Firebird 2.5.9, and 3.0.5, but should also support other Firebird versions from 2.0 and up. Firebird 4 is not fully supported in Jaybird 3.x.

Formal support for Firebird 1.x has been dropped (although in general we expect the driver to work). The Type 2 and embedded server JDBC drivers use JNA to access the Firebird client or embedded library.

Jaybird 3 is the last version to support Firebird 2.0 and 2.1.

Jaybird 3 currently receive maintenance updates, but we recommend upgrading to Jaybird 4.

Notes on Firebird 3 support

Jaybird 3.0.4 added support for wire protocol encryption and database encryption. See Wire encryption support and Database encryption support for more information.

Jaybird 3 does not support the Firebird 3 zlib compression.

Notes on Firebird 4 support

Jaybird 3 can connect and query Firebird 4. Longer object names are supported.

The new data types introduced in Firebird 4 are not supported. Support for data types like DECFLOAT and NUMERIC/DECIMAL with precision higher than 18 will be introduced in Jaybird 4.

The Srp256 authentication plugin is supported, but the other SrpNNN plugins are not.

Jaybird 3 does not support the Firebird 4 zlib compression.

Jaybird 2.2

Jaybird 2.2.x was tested against Firebird 2.5.8 and 3.0.4, but should also support other Firebird versions from 1.0 and up. The Type 2 and embedded server JDBC drivers require the appropriate JNI library. Pre-compiled JNI binaries for Win32 and Win64 and Linux platforms are shipped in the default installation, other platforms require porting/building the JNI library for that platform.

Using Jaybird 2.2 on Firebird 3 requires some specific configuration changes from the Firebird 3 defaults, see also Jaybird and Firebird 3.

Jaybird 2.2 is end-of-life and will no longer support updates. We recommend upgrading to Jaybird 4.

General

This driver does not support InterBase servers due to Firebird-specific changes in the protocol and database attachment parameters that are sent to the server.

Supported Java versions

Jaybird 4

Jaybird 4 supports Java 7 (JDBC 4.1), Java 8 (JDBC 4.2), and Java 11+ (JDBC 4.3). The Java 11 build uses the same sources as the Java 8 version.

Given the limited support period for Java 9 and higher versions, we limit support on those versions to the most recent LTS version and the latest release.

Jaybird 4 is not modularized, but declares the automatic module name org.firebirdsql.jaybird.

Jaybird 3

Jaybird 3 supports Java 7 (JDBC 4.1), Java 8 (JDBC 4.2), and Java 9 - 11 (JDBC 4.3). Support for earlier Java versions has been dropped.

For the time being, there will be no Java 9+ specific builds, the Java 8 builds have the same source and all JDBC 4.3 related functionality.

Given the limited support period for Java 9 and higher versions, we may limit support on those versions to the most recent LTS version and the latest release.

Jaybird 3.0 is not modularized, but since Jaybird 3.0.3, it declares the automatic module name org.firebirdsql.jaybird.

Jaybird 2.2

Jaybird 2.2.x supports Java 6 (JDBC 4.0), Java 7 (JDBC 4.1), Java 8 (JDBC 4.2). Support for earlier Java versions has been dropped. Support for Java 8 (JDBC 4.2) has been added in Jaybird 2.2.4. Support for Java 5 (JDBC 3.0) has been dropped after Jaybird 2.2.7.

JDBC Extensions

Jaybird provides extensions to some JDBC interfaces. All extension interfaces are released under a modified BSD license, on "AS IS" basis. This should make linking safe from the legal point of view. All classes belong to the org.firebirdsql.jdbc.* package.

More information can be found on our JDBC Extensions page.

Type 2 JDBC Driver

Jaybird 1.0 provided a pure Java wire protocol implementation. While being most effective in client-server setups (even more effective than native client libraries), it performed worse when connected to the server residing on the same host compared to native (C/C++/Delphi/etc) solutions. The reason is that a type 4 driver communicates with the server using network sockets, which introduces additional overhead. The native client library has the possibility to use IPC when connecting to the database on the same host. This can increase performance by 100%.

Jaybird 1.5 introduced a type 2 JDBC driver that uses the native client library to connect to the database. Additionally, Jaybird 1.5 and later can use the embedded version of the Firebird relational database allowing the ability to create Java applications that do not require a separate server setup.

Note that the information below might be outdated

However, the type 2 driver also has limitations. Due to multi-threading issues in the Firebird client library, it is not possible to access it from different threads simultaneously while running in local mode (IPC). In this case only one thread is allowed to access the library at a time. The driver tries to provide necessary synchronization. The current implementation uses a mutex that is local to the class loader of the Jaybird classes. This poses some deployment limitations: jaybird-2.2.8.jar must be deployed such that it is loaded by the system class loader. For stand-alone web containers like Resin or Tomcat, Jaybird should usually be deployed in their lib/ directory. It can be included in the WAR archives, but this is safe only if exactly one application accesses Firebird.

When accessing remote servers, a thread per connection policy applies. The driver provides necessary synchronization for this situation.

Embedded version of the server cannot be used on Linux systems in multi-threaded applications. In particular this makes the embedded version of the server unusable for web applications, where usually each request is served in separate thread.