Jaybird information

Jaybird is a JCA/JDBC driver suite for the Firebird database server. Historically, Borland opened sources of the type 3 JDBC driver called InterClient. However, due to inherent limitations of the Firebird client library it, the type 3 driver was considered a dead end, and the Firebird team developed a pure Java implementation of the wire protocol. This implementation became the basis for JayBird.

The Jaybird driver is based on both the new 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 co-operate with a driver so that the application server manages transactions, security, and resource pooling, while the driver supplies only the connection functionality. Although similar to the JDBC 2 XADataSource idea, the JCA specification is considerably clearer on the division of responsibility between the application server and driver.

Jaybird requires at least JDK 1.3.1 to compile and run properly.

JDBC Extensions

JayBird 1.5 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 also provides a type 2 JDBC driver that uses the native client library to connect to the database. Additionally, JayBird 1.5 can use the embedded version of the Firebird relational database allowing the ability to create Java applications that do not require as separate server setup.

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: firebirdsql.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: 2006/07/22 23:53 by dk