RimuDB Logo
Database Access Framework for Java

Release Notes

Release 1.3.8
This release changes the way the editor works when loading JDBC drivers, fixes a bug with
WhereLists, and allows DBCopy to run without the editor jar file in the classpath.

* Fixed RDB-0059 'RimuDBEditor - DriverLoader deadlocks on startup'
Changed the design of RimuDBEditor so that the custom Classloader thread that discovers JDBC drivers
in the classpath doesn't run on startup. This thread deadlocked for some users but was not
repeatable in the test environment. The new design provides JDBC Driver configurations in
the base install for all the supported databases.

On startup, the editor checks if these specific JDBC classes are present in the classpath
without using a custom classloader. Those JDBC classes that are found are shown in the
Import Wizard and the Preferences Dialog with an icon indicating they are usable drivers.

A JDBC driver can be manually added in the Preferences Dialog without having to run the custom
classloader.

The Add JDBC Driver Dialog now includes a 'Discover' button that will run the custom classloader
to find JDBC Drivers in the classpath. If running this causes a deadlock in your environment,
you can manually add the name of the JDBC Driver instead.

* Fixed RDB-0058 'Incorrect binding when valueIsProperty used in WhereList'

* Fixed RDB-0054 'NoClassDefFoundError using DBCopy'

* Updated icons in RimuDBEditor. Replaced the old icons from Sun with icons from famfamfam.com.

* Changed AboutDialog so that some important System Properties are displayed. Added credits tab.

Release 1.3.7

This release fixes a bug with IN operators in a WhereList, corrects serialization for instances
of DataObject and other minor changes listed below.

* Fixed RDB-0057 'Using a WhereList IN operator causes a ClassCastException'
When a WhereList attempted to use the IN operator, the corresponding value array was not
bound to the prepared statement correctly.

* Added serialization support for DataObjects. A de-serialized DataObject previously
required access to a CompoundDatabase in order to access the TableMetaData and
ColumnMetaData. This is now cached inside a DataObject allowing serialization and
de-serialization of the object.

* Added types to some internal Collections to eliminate warning messages.

* RimuUtils.getVersionString() did not correctly report the version number if the
classpath contained another file named version.properties. The internal file version.properties
was renamed to avoid namespace collisions.

* Changed the wording of the Exception thrown by DataObject.reload() when the database is null.

* Minor changes to JavaDoc

* Added more test cases to improve test coverage.

Release 1.3.6
* Fixed RDB-0051 - Can't add additional JDBC properties in compound database XML
Created a new schema for the CompoundDatabase XML (compounddatabase-3.3.xsd)
that allows additional properties to be specified for the JDBC driver.
Previously these had to be specified on the JDBC connection URL, but not all
databases support this; Oracle in particular.

* Fixed RDB-0052 - Incorrect SELECT SQL for Oracle when a limit is added
Corrected code that incorrectly generated Oracle SQL for SELECT statements
that limited the number of results returned.

* Fixed RDB-0053 - Oracle CHAR types don't work because of blank padding
Changed the way values are bound to prepared statements for a specific
case with Oracle. This allows the 'FixedString' property to be used.

* Changed all the unit test classes to use JUnit4 instead of JUnit3.

* Added more test cases to improve test coverage.

Release 1.3.5

This release fixes a bug with the TOP clause used in SELECT clauses with SQL Server.

Release 1.3.4

This release fixes a bug that prevented JNDI connections from being established, fixes
some other minor bugs and adds some JavaDoc.

* Fixed RDB-0050 - JNDIConnectionPool does not work.
CompoundDatabase.connect() was only calling the Database.connect() method when the pool
configuration was an instance of IConnectablePool (i.e. only for C3P0 and DBCP).
The connect() method needs to be called for the JNDI pool to perform initialize
actions for the Database instance. Code was added to call the connect method when
the pool configuration is a JNDI pool.

* SQLExporterDialog was changed to allow SQL CREATE TABLE statements to be generated for
Apache Derby.

* Fixed NPE in DefaultAdapter.getCreateTableSQL().

* Changed error message in SQLAdapterFactory.createInstance().

* Added JavaDoc to various classes.


Release 1.3.3

This release adds the DBCopy tool which allows tables to be easily copied from one
database to another. The tool can be used without having to create Table Descriptor
XML documents or DO and Finder classes, meaning that the tool is fast to configure and
use. For more information on the use of the tool see the documentation at:
http://www.rimudb.org/dbcopy .

Creating this tool required a number of changes to be made to expose some of the
internal functionality used by RimuDB. These exposed functions can now also be used by
other programs. The following changes were made:

* The AbstractXmlLoader class was created. It can be used to load an XML document from
either the classpath, file system or a URL. It has the capability of validating against
a schema specified in the XML document itself or against a set of one or more schemas
passed as parameters to the class.

* RimuUtils.getQualifiedTableName() will correctly format a fully qualified table name
with catalog and schema and quotes for the given database.

* RimuUtils.loadMetaData() returns the meta data for a table in a concise format. The meta
data returned includes column specifications, primary keys and identity columns. Some of
these elements are not reliably returned with the method Connection.getDatabaseMetaData().
This method uses techniques that will work on all the supported databases.

* ISQLAdapter.getSelectAllSQL() returns an SQL statement that will return all records
in a table.

* ISQLAdapter.getTruncateTableSQL() returns an SQL TRUNCATE statement.

* ISQLAdapter.correctRecordData() transforms data in a record that may have originated from
another database so that it can be written to the current database.

* ISQLAdapter.build() returns an SQL SELECT statement built from the different clauses passed
as parameters. The advantage of using this method is the correct placement of result set
limiting keywords such as TOP or LIMIT.

Release 1.3.2

This release fixes a minor problem, corrects some JavaDoc, updates copyright notices and adds a minor
feature to the editor for converting old documents.

* Changed Record.getChangedPropertiesText() to handle null values correctly. This caused a
NullPointerException when changed records where found and the values were being reported to
the user.

* Minor corrections to JavaDoc method parameter names.

* Changed all the copyright notices to include 2011.

* Changed editor tool for converting old Compound Database documents to allow either
files or directories to be chosen.


Release 1.3.1

This release fixes a thread race bug, cleans up some logging and adds some minor enhancements.

* Fixed RDB-0048 - NPE when multiple threads call Database.getTableDescriptor()

* Added Database.getSqlAdapter() to allow callers access to the database specific adapter. In
the majority of cases this would not be used. The basic methods provided by the Finder:
find(), select(), selectAll() use the adapters automatically. However, a developer may
need a database agnostic way to include locking hints in a GenericQuery. Having access
to the SQL adapter allows that ability.

* Changed DataObject.toString() to return a more meaningful String that includes the
names of primary keys as well as the values of those keys.

* Added logging to Table.get() so that SQL statistics and statements can be logged.

* Added optional attribute to the Compound Database XML document that allows auto increment
keys to be entirely disabled for a table.


Release 1.3.0

This release adds support for two new databases: Apache Derby and IBM DB2 for Linux,
UNIX and Windows. It fixes several bugs, one of which (RDB-0047) is considered a high
priority fix.

The following changes were made:

* Added support for Apache Derby

* Added support for IBM DB2 for Linux, UNIX and Windows.

* Fixed RDB-0047 - Data type mismatch error in RecordBinder

* Fixed RDB-0046 - Editor may generate bad MySQL CREATE TABLE statements for VARCHARs of
certain sizes.

* Fixed RDB-0045 - Table matching logic for SQL statements can pick wrong DO class.

* The method DatabaseConfiguration.getJdbcSubProtocol() was added.

* Added hashCode() and equals() methods to WhereEntry and WhereList.

* Changed DataObject, WhereList, WhereEntry and RecordValue to implement Serializable.


Release 1.2.2

This release fixes a single bug - when a CompoundDatabase was set to validate the XML
configuration files, it was connecting to the XML Schema URL. This required remote
connectivity to the URL. The copies of the XML schema are now stored in the jar
file, and validation loads these XML schema files from the classpath.

* Fixed RDM-044 - CompoundDatabase validates to remote XML Schema URL


Release 1.2.1

* Fixed RDM-043 - Editor images missing from build.


Release 1.2.0

This release adds a new type of connection pool, makes a change to the XML Schema for
the Compound Database XML configuration file and fixes a few bugs.

The most significant new feature is the addition of a third type of connection pool. RimuDB
has always had support for C3P0 and Apache DBCP, but in this release now includes support for
a JNDI connection pool. This allows RimuDB to make use of connection pools provided by
containers. Although it was always possible to use RimuDB in a Servlet or within a Spring
container, up until now it wasn't possible to use JNDI to access an Application Server's
pool. This commonly used configuration is now supported.

In order to make configuration of this connection pool possible, a change has been made to the
XML Schema for the Compound Database XML configuration file. Specifically, the JDBC element
has now been combined with the connection pool element. In addition the group element has
become an attribute of the database element.

The new XML Schema is compounddatabase-3.2.xsd. Future Compound Database XML documents should
refer to this new XML Schema rather than the old version (3.1). The old version will continue
to work, but does not support the new JNDI Connection Pool.

Although it is not difficult to manually convert old Compound Database XML documents to the
new format, a tool has been added to the editor that will convert all the old format documents
found in a directory to the new format. The editor tool is on the Tools menu, named 'Convert
CDB Configs (pre 1.2)'.

The features and fixes added in the release are:

* RDB-0040 - Add the ability to use a container connection pool
* Added the JNDI Connection Pool and created a new version of the Compound Database XML
Schema to accommodate the changes.

* RDB-0041 - Update DBCP Connection Pool to version 1.3
* RimuDB was tested successfully with the new version (1.3) of the DBCP connection pool.
Note that although support is provided for DBCP, it does not appear to be as robust
as C3P0.

* Fixed RDB-042 - Default transaction isolation and default auto commit values not honored
* The pool managers were not setting these values on checked out connections.

* Fixed bug in DBCPPoolConfiguration: max_active_connections was never set on the DBCP pool.

* Added several unit tests for the pool configurations.


Release 1.1.0

This release fixes a number of bugs, but there are two significant changes in this release.

The first is a correction to WhereLists so that they generate prepared statements and not
plain statements from concatenated SQL and values. Concatenating values to build SQL allows
SQL injection attacks.

The second is the deprecation of KeyLists in favor of WhereLists. All the functionality of a
KeyList can be performed by a WhereList, and it only added confusion to have both classes
present. Any Finders that have been generated prior to this release will still contain
KeyLists. Although they will continue to function, they should be converted using the editor
tool, as KeyLists will be removed in a future release. The editor tool is on the Tools menu,
named 'Convert pre version 1.1 Finders'.

List of Fixes:

* Fixed RDM-0028 - Improve algorithm for DataObject name derivation in RimuDBEditor Import from Database
* 'Import from Database' now creates slightly better formatted names for the DataObjects. It
uses the table name, proper-casing the name and removing underscores.

* Fixed RDB-0030 - KeyList should be replaced with WhereList
* The KeyList class has been deprecated as it duplicated all the functionality of the WhereList class.
* For those methods that previously used KeyList parameters, new methods have been added
to use WhereList parameters.
* The editor tool will now create Finder.find() and Finder.delete() methods that use WhereLists instead
of KeyLists.
* A new tool was added to the editor that allows old Finder classes to be converted to use WhereLists
instead of KeyLists in the find() and delete() methods.
* NOTE: In a future release the KeyList class will be removed.

* Fixed RDB-0034 - Primary key columns list in editor needs enhancement
* Added Drag and Drop to allow the primary key column sequence to be rearranged.
* Implemented drag operations on the table of columns to allow columns to be dragged
to the primary column list.

* Fixed RDB-0035 - RimuDB Editor fails to load descriptors with out of sequence keys
Out of sequence key numbers in a table descriptor document are now handled correctly.
Duplicate key numbers are now handled more gracefully.

* The SQL adapter classes were changed so that WhereLists use prepared statements instead of plain
statements created by concatenating values. This helps prevent SQL injection attacks.

* The ability to use the IN and NOT IN operators was added to the WhereList class.

* The method DataObject.copyTo(DataObject dataObject) was added to allow the values from a DataObject to be
copied to another instance of the same class of DataObject.

* The CredentialValidator class was added. This class can be used to validate a userID and password
for a Database. This is useful for validation of a password dialog when a user is logging into
and application and their credentials need to be authenticated.

* The method DatabaseConfiguration.getDatabaseHost() was added to return the host portion of the JDBC URL.
This is useful when the host name for a connection needs to be logged or displayed.
Displaying the full URL is often inappropriate especially since it may contain a user ID
and password.

* The method Database.forceTableLoad() was added to permit all the tables in the configuration to be loaded
instantly rather than on demand.

* The logo images used in the editor were updated.

* A directory browse button was added to the editor's CreateClassesDialog.


Release 1.0.2

* Added a feature that allows the editor to generate a file containing the CREATE TABLE sql statement
at the same time the DO and Finder classes are generated.


Release 1.0.1

* Fixed RDB-0038 - RecordBinder.bindForUpdate() does not handle null column values
* When a GenericQuery is used to return the SQL query results, and a record contains
a column with a null, a record update will fail with the message
'Invalid value for parameter x'. The method was changed to not increment the
columnIndex for null values.

* Added new tool to the editor to generate code for copying properties between two identical Data Objects.


Release 0.5.9

* Fixed RDB-0036 - When an iSeries table is imported into the editor and property names
are derived from column text or column headings, an exception occurred
if there was no column text / heading text present in the database

* Fixed RDB-0037 - If a CompoundDatabase was created and validateXML was passed as false,
then validation was still performed for Table Descriptor XML documents

Release 0.5.8

This release contains minor bug fixes.

* A unix shell script has been added so the editor can be run on unix desktops.

* Various bugs were fixed to improve the editor behavior, particularly on unix systems.

* A property search and replace option was added to the tool menu.

* DefaultResultSetBinder (introduced in 0.5.7) was renamed to DefaultIterativeResultSetBinder
due to the addition of the DefaultQueryResultSetBinder.

* The add methods for WhereList was changed to return a WhereList to allow chaining of adds.

* The add methods for OrderByList was changed to return a OrderByList to allow chaining of adds.

* The Finder.select(WhereList whereList, OrderByList orderByList) method did not permit the
creation of SQL statements without an ORDER BY clause. The marker value of OrderByList.NONE
was added to allow this to be specified. Also OrderByList.PRIMARY_KEY and was added to
explicitly request the primary key in the ORDER BY rather than relying upon passing a null,
or having to create an OrderByList each time.


Release 0.5.7

This release contains minor bug fixes, the addition of more JavaDoc and a cleanup of unused code.

* The RimuDBEditor Import from Database Wizard has some modifications:
* The third page of the wizard shows the available tables is a JList rather than a JComboBox.
This works much better for databases with a large number of tables to choose from.
* The text on the fourth page of the wizard is improved, and hopefully more readable.

* The class DefaultResultSetBinder has been added. This should reduce the amount of code that needs
to be written for certain types of GenericQueries. A description and examples of it's use will
be added to the documentation in the near future.

* The MySQLAdapter.convertSQLType() has been modified to handle Types.LONGVARCHAR.