Jaybird JCA/JDBC Driver
Release Notes v 2.1.6
Table of Contents
General Notes
Supported Firebird versions
Specification support
What's new in Jaybird 2.1
Events
Support for multiple JNI libraries
Default holdable result sets
Other features
What's new in Jaybird 2.0
Refactorings
Updatable result sets
Firebird management interfaces
Incompatible changes since Jaybird 2.0
Jaybird JDBC extensions
JDBC 3.0 compatibility
Distribution package
License
Source Code
JDBC URL Format
Pure Java
Using Firebird client library
Embedded Server
JDBC connection properties
Using Type 2 and Embedded Server driver
Configuring Type 2 JDBC driver
Configuring Embedded Server JDBC driver
JDBC 3.0 Compatibility
JDBC 3.0 deviations and unimplemented features
Jaybird Specifics
Result sets
Using java.sql.ParameterMetaData with Callable Statements
Using ResultSet.getCharacterStream with BLOB fields
Heuristic transaction completion support
Connection pooling with Jaybird 2.0
Usage scenario
Connection Pool Classes
org.firebirdsql.pool.FBConnectionPoolDataSource
org.firebirdsql.pool.FBWrappingDataSource
Runtime object allocation and deallocation hints
Documentation and Support
Where to get more information on Jaybird
Where to get help
Reporting Bugs
Corrections/Additions To Release Notes
General Notes
Jaybird is JCA/JDBC driver suite to connect to Firebird database server. Historically Borland
opened sources of type 3 JDBC driver called InterClient. However due to some inherent limitations
of Firebird client library it was decided that type 3 driver is a dead end, and Firebird team developed
pure Java implementation of wire protocol. This implementation became basis for Jaybird, pure
Java driver for Firebird relational database.
This 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 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 2 XADataSource idea, the JCA specification is
considerably clearer on the division of responsibility between the application server and driver.
Supported Firebird versions
Jaybird supports Firebird 1.0.x, Firebird 1.5.x, Firebird 2.0.x and Firebird 2.1.x SuperServer and
Classic regardless of the platform on which server runs when type 4 JDBC driver is used. Type 2
and embedded server JDBC drivers require JNI library, precompiled binaries for Win32 and Linux
platforms are shipped in the default installation, other platforms require porting/building JNI library
for that platform.
Driver no longer supports InterBase servers due to a Firebird-specific changes in database
attachment parameters that are send to the server.
Specification support
Driver supports following specifications:
JDBC 4.0 Driver compiles and runs with JDK 6.0 and JDBC 4.0 interfaces.
Almost all new methods either return empty/unknown results or
throw appropriate exceptions.
JDBC 3.0 Driver passed complete JDBC compatibility test suite, though
some features are not implemented. It is not officially JDBC
compliant, because of high certification costs.
JDBC 2.0 Standard
Extensions
Jaybird provides implementation of following interfaces from
javax.sql.* package:
• ConnectionPoolDataSource implementation provides
connection and prepared statement pooling.
• DataSource implementation provides seamless integration
with major web and application servers.
• XADataSource implementation provides means to use
driver in distributed transactions.
JCA 1.0 Jaybird provides implementation of
javax.resource.spi.ManagedConnectionFactory and related
interfaces. CCI interfaces are not supported.
JTA 1.0.1 Driver provides implementation of
javax.transaction.xa.XAResource interface via JCA
framework and XADataSource implementation.
JMX 1.2 Jaybird provides MBean to manage Firebird server and installed
databases via JMX agent.
What's new in Jaybird 2.1.6
List of bugs fixed since Jaybird 2.1.5
JDBC-97 Blob.getBytes() method should not allow position below 1
JDBC-108 and
JDBC-119
JDBC-108: Problems with record resultset to call primary composite
JDBC-119: updateRow() primary key violation issue
JDBC-118 Remote PID and process name for FB 2.1 monitoring tables
The only platform independent solution turns out to be via the -D property,
therefore two new properties: org.firebirdsql.jdbc.pid and
org.firebirdsql.jdbc.processName. If they are specified, values are passed
to Firebird 2.1. Also the behavior with previous versions of FB is undefined, so
use them with care.
List of bugs fixed since Jaybird 2.1.4
- Fixed bug in event handling code under Linux.
List of bugs fixed since Jaybird 2.1.3
- Updated wire protocol implementation for events handling to make Jaybird
compatible with Firebird 2.1. See also
http://tracker.firebirdsql.org/browse/DNET-140
- Updated handling of the table reservation in test cases to make it compatible
with Firebird 2.1
List of bugs fixed since Jaybird 2.1.2
JDBC-106 When table name contains lower case letters, metadata information about table
columns is not returned from the driver.
List of bugs fixed since Jaybird 2.1.1
JDBC-100 When using the FBDatabaseMetaData.getColumns() method to check wether a
column is nullable or not, the method will return wrong values for columns,
wich are defined by a domain.
- Fixed issue with DatabaseMetaData result sets, when underlying statements
were not closed when connection was closed and caused errors during garbage
collection.
- Support for INSERT...RETURNING statements.
- JDK 6.0 compatibility.
List of bugs fixed since Jaybird 2.1.0
JDBC-92 DatabaseMetaData becomes unusable when the statement that serves the result
set is closed.
JDBC-87 Backported feature of upcoming Jaybird 2.2 release that allows specifying the
octetsAsBytes connection property and receive byte[] when using the
ResultSet.getObject() method
JDBC-85 Fixed returning of the error messages.
- Bug reported in Firebird-Java group. ClassCastException when obtaining
byte[] from BLOB fields in cached result set.
Jaybird 2.1 introduces following new features:
Events
Events is one of the unique features in the Firebird RDBMS and allows asynchronous notification
of the applications about named events that happen in the database. The information about how to
use this feature can found in free IB 6.0 documentation set as well as in The Firebird Book by Helen
Borrie.
The interfaces and classes for the event support can be found in org.firebirdsql.event package,
which includes:
● EventManager interface to register for the synchronous and asynchronous notification about
the events in the database;
● EventListener interface which has to be implemented by the application that wants to
participate in the asynchronous notification;
● DatabaseEvent interface which represents the object that will be passed to the
EventListener notification method;
● Implementation of the above interfaces: FBEventManager and FBDatabaseEvent.
Please note, that each instance of FBEventManager will open a new socket connection to the
Firebird server on the port specified by the Firebird.
Similar to other JDBC extensions in Jaybird, the interfaces are released under the modified BSD
license, the implementation of the code is released under LGPL license.
Support for multiple JNI libraries
Until this release only one client library could be loaded in the single JVM. That could be either
embedded Firebird library (fbembed.dll/libfbembed.so), or Firebird client library
(fbclient.dll/libfbclient.so) or Fyracle client library. This could lead to possible problems,
for example, if embedded Firebird was used first, JDBC driver would access database file directly
instead of using the local IPC protocol if only path to the database was specified. It was not possible
to change this without restarting the JVM.
Now Jaybird is able to correctly load arbitrary number of shared libraries that implement the ISC
API and forward the requests correctly depending on the type of the driver being used. Note, this
feature requires new JNI library (jaybird21.dll/libjaybird21.so)
Note, the JNI library (jaybird21.dll/libjaybird21.so) was changed in a incompatible manner
between Jaybird 2.1 beta 1 and Jaybird 2.1 RC1 releases. Please ensure to use the latest
version.
Default holdable result sets (closed ResultSet in auto-commit mode)
New connection property that allows to create holdable result sets by default. This is needed as an
workaround for the applications that do not follow JDBC specification in regard to the auto-commit
mode.
Specifically, such applications open a result set and, while traversing it, execute other statements
using the same connection. According to JDBC specification the result set has to be closed if
another statement is executed using the same connection in auto-commit mode. Among others the
OpenOffice Base users have problems with the restored JDBC 3.0 compatibility in Jaybird 2.0.
The new property is called:
● defaultResultSetHoldable as connection property for JDBC URL or for
java.sql.DriverManager class and no or empty value should be assigned to it; it has an
alias defaultHoldable to simplify the typing;
● isc_dpb_result_set_holdable as a DPB member;
● FirebirdConnectionProperties interface was with two methods extended (the
isDefaultResultSetHoldable() and setDefaultResultSetHoldable(boolean)) which
is also reflected in the FBConnectionPoolDataSource and FBWrappingDataSource
classes.
Note, the price for using this feature is that each holdable result set will be fully cached in
memory. The memory occupied by it will be released when the statement that produced the
result set is either closed or re-executed.
Other features
StatisticsManager now provides methods to fetch statistics for the specified tables only (like the
-t switch in gstat) and to provide also analysis of average record and version length.
What's new in Jaybird 2.0
Jaybird 2.0 underwent significant internal changes that are not directly visible to the client code, and
not necessarily introduced new features. However those changes significantly increase code
modularity, stability and maintainability.
Refactorings
• Significant refactoring of the org.firebirdsql.gds.* package. Implementations of the
interfaces defined in this package are now dynamically loaded from the classpath and
provide possibilities to extend driver with custom code without changing the driver itself.
• JCA code was significantly changed, bringing a long awaited stability when critical errors
happen into that vital part of code. There is no more so-called “fatal” errors that can cause
driver to recycle connections and transactions.
• Refactoring of the transaction and object life-cycle management in the JDBC code. Main
reason for this change was the need to remove result set caching in auto-commit mode and
make it JDBC specification compliant, but it has also positive effect on the code stability
and maintainability.
• Unified connection property handling in JCA, driver manager and pooling code. This solves
a longstanding issue with different configuration possibilities in different modes.
• Refactorings to support JDK 5.0.
Updatable result sets
Jaybird provides now support for the updatable result sets. Feature allows Java application to update
current record using the updateXXX methods of java.sql.ResultSet interface. Updates are
performed within the current transaction using a best row identifier in WHERE clause. This sets the
following limitation on the result set “updatability”:
• the SELECT references single table;
• all columns not referenced in SELECT permit NULLs (otherwise INSERTs will fail);
- 1
- 2
- 3
前往页