This wiki has moved to

We no longer update this wiki, please update your bookmarks!

Jaybird information

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 2.2.x was tested against Firebird 2.1.7 and 2.5.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.

The next version of Jaybird (3.0) will drop formal support for Firebird 1.x (although in general we expect the driver to work).

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

Supported Java versions

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.

The next version of Jaybird (3.0) will drop support for Java 6 (JDBC 4.0).

JDBC Extensions

Jaybird 2.2 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.2.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.

info/start.txt · Last modified: 2016/04/19 22:13 by mrotteveel