Next: Further development
Up: Implementation
Previous: Console tool
During the application development we decided to change following
things:
- GeneralConnection has been renamed to DatabaseConnector, *Connection classes to
*Connector, and we decided to make DatabaseConnector an abstract class, because there is no such
thing like universal connector which backs up any type of database and some of the methods
simply had to be done in derived connectors
- When we started implementing restore, it turned out that the database has to be cleared
of old tables before the new ones are inserted. That involved not only "DROP TABLE"
queries, but also some "ALTER TABLE", because we learned that before the tables are removed,
some constraints have to be removed from them. That is because we can't delete a table
as long as there is any other table that uses its fields as foreign keys. So first the
constraints have to be removed from tables, then the tables themselves, and only then
new versions of tables can be added to the database.
- To create the web interface, we decided to use Java Server Faces (MyFaces)
instead of Struts.
- We decided to extend the configuration subsystem, using one abstract base class and
a few implementing classes, handling different ways of storing the configuration (for
example, in local filesystem and on a FTP server). The reason for this is that storing
the configuration in local files may not be safe, because they may get lost when the
application is redeployed.
- We added a Mailer class using Sun's JavaMail framework to send notification emails.
- During the development we created a TestDump class which at first was meant to test
the behavior of ,,engine'' classes while the web GUI was not finished, and later it
evolved into a simple but powerful command line client for Jdbdump.
- The methods initializing and downloading the stream of data records from a table in
a database have been moved to specific connectors, because it turned out that even these
simple commands have to be handled specifically for them (e.g. MySQL requires that table
names are given in apostrophes (``) if they contain some special characters, and some
databases don't support setFetchSize() so their connectors have to do it for them.
- We added the Log4J library and replaces System.out.println() calls with Log4J methods.
- At first we couldn't download a test MySQL database, because it threw SQLExceptions
concerning a date in a wrong format. We found later on the net that it was caused by
MySQL JDBC driver's wrong interpretation of date; MySQL server allows storing an empty
date (0000-00-00), but the JDBC driver throws an SQLException when it sees one. We learned
that a special option ,,?zeroDateTimeBehavior=convertToNull'' had to be added to the
connection URL to fix that.
Next: Further development
Up: Implementation
Previous: Console tool
Wiktor Kolodziej
2006-01-12