Javalee DB2Java

 What's Javalee DB2Java?

 Downloads

 Installing and Running

 Personalization

 History

 TO DO List

 Java API Doc

 CVS

 Author

Javalee DB2Java Personalization

You can personalize Javalee DB2Java to attend your specific needs like:

  • Adding support for any other Relational Database System
  • Editing current RDBMS configuration
  • Adding personalized output types
  • Editing existing output templates
Configuring RDBMS

Javalee DB2Java supports all kinds of relational databases, as long as the user can provide a JDBC driver and its configurations.

To add or just change any RDBMS (Relational Database Management System), you must edit the configurations file db2java.conf located at the conf directory.

In this file, you will the section:

## RDBMS Configurations ##

In this section you will see an entry like this:

rdbms=mysql;oracle;mssql;postgres;firebird

Here you see all the RDBMS entries specified in the config file. To add, change or remove any RDBMS you must change this property first. All the RDBMS entries are separated by a semi-colon character. No spaces are accepted.

For each entry configured in the above property, there is an existing set of properties that configure that specific RDBMS entry. See the example bellow for mysql:

rdbms.mysql.label=MySQL
rdbms.mysql.driver=org.gjt.mm.mysql.Driver
rdbms.mysql.url=jdbc:mysql://$host:$port/$database
rdbms.mysql.port=3306

So, this is the configuration set for MySQL support. You can see that it informs to the program, the label that will be displayed in the program, the fully qualified class name of the JDBC driver, the URL and the default port number.

See that the URL has some special character on it. This is necessary so the Javalee DB2Java can replace the special words with the values defined by the end-user. In the URL you MUST put $host that will be replaced with the host name or IP address, also you MUST put $port where will be replaced with the port number, and you can optionally put $database to be replaced with the database name. It will depend strictly on the URL demanded by the JDBC driver in use. For more details, see the JDBC driver's documentation.

The JDBC driver of the new configured RDBMS should be type 4 and provided by the user. Just put the JAR file wih the JDBC driver in the lib directory.

You must restart the program so the changes can take effect.

Configuring Output Types

Javalee DB2Java gives support to the user to provide his own defined output template. This is done by providing an XSL file, based on the XML DTD, and also some simple configurations in the application config file.

To add or just change any Output Type, you must edit the configurations file db2java.conf located at the conf directory.

In this file, you will the section:

## Outputs Configurations ##

In this section you will see an entry like this:

output=xml;javabean;dao

Here you see all the Output Types entries specified in the config file. To add, change or remove any Output Type you must change this property first. All the Output Types entries are separated by a semi-colon character. No spaces are accepted.

For each entry configured in the above property, there is an existing set of properties that configure that specific Output Type entry. See bellow:

output.xml.label=XML
output.xml.xls=xmloutput.xsl
output.xml.checked=true
output.xml.filenamePattern=$name.xml

So, this is the configuration set for XML Output. You can see that it informs to the program, the label of the output type that will be dislayed in the programa, the xsl filename (template), the checked status - informing if this option should be checked by default, and the filename pattern which is the name of the files that will be generated for this specific output.

See that the filename pattern has a special character on it. This is necessary so the Javalee DB2Java can replace the name. In the filename pattern you MUST put $name that will be replaced with the java-name of the table, that is the normalized name to a Java standard name (e.g.: a table named USER_TABLE, has a java-name like this: UserTable).

The XSL file of the new Output Type should be provided by the user. Just put the XSL file in the conf directory of the Javalee DB2Java installed directory.

You must restart the program so the changes can take effect.

This software is proudly made in Brasil