Installing the EJBWizard

Note

This document frequently refers to a directory symbolically referred to as $EJBWIZARD_ROOT. This is the base directory of the EJBWizard installation and is set as an environment variable, which should have the absolute pathname of the EJBWizard's base installed directory. If you are using Microsoft Windows[TM], you would write this as %EJBWIZARD_ROOT%, so "$EJBWIZARD_ROOT/templates" is the Unix/Linux equivalent of Windows' %EJBWIZARD_ROOT%\templates"

The EJBWizard is distributed as a tar'ed gzip'ed file, which can be unpacked under Unix/linux using the tar and gzip utilities and under Microsoft Windows using WinZip[TM]. It is available in binary and source distributions. The source distribution can be used to create the binary distribution, and is not needed unless you wish to customize the EJBWizard program itself

To install the EJBWizard, first select the directory into which you wish to place the application. Good choices are /usr/local for Linux or "C:\Program Files" for Microsoft Windows. The directory containing the EJBWizard and its components will be placed in that directory. Under Linux, you can unpack the tarball with the following command

Installing under Microsoft Windows[TM]

  1. Use WinZip to open the file, and when it asks whether to open the tar file inside the ZIP file, say "yes", with the output directed to your installation directory ("C:\Program Files").

  2. Set the environment variable EJBWIZARD_ROOT to point to the location where you've installed the EJBWIZARD. One way to do this is to use the Windows System options for NT-based systems, or modify C:\AUTOEXEC.BAT for Windows 9x-based systems. You only actually have to do this if you don't modify the EJBWIZARD.BAT file.

  3. Either copy the EJBWIZARD.BAT file to a directory in your PATH or add the EJBWIZARD\bin directory to your PATH

  4. Customize the EJBWIZARD.BAT file to point to your JDBC JAR files and make any other modifications you may need. The sample EJBWIZARD.BAT is set up for the PostgreSQL DBMS.

  5. The EJBWIZARD\datasources directory has the master datasource file list (datasource.properties) and a sample datasource file named MyDatasource.properties which shows how to set the EJBWizard's JDBC connection(s). You can add/or remove datasource definition files as needed. These definitions will be the ones that show up when you click the "Datasources" button on the EJBWizard "Data" tab.

Installing under Linux or other Unix(-like) systems

  1. cd to the directory where you want the EJBWizard installed (example, /usr/local) and untar/zip the tarball:

    tar xvzf EJBWizard-xxxxxxx-bin.tgz

    where "xxxxxx" is the specific version number.

  2. Set the environment variable EJBWIZARD_ROOT to point to the location where you've installed the EJBWIZARD. You generally will do this in your login profile script

  3. Either copy the ejbwizard.sh file to a directory in your PATH or add the EJBWizard/bin directory to your PATH

  4. Customize the EJBWizard.sh file to point to your JDBC JAR files and make any other modifications you may need. The sample EJBWizard.sh is set up for the PostgreSQL DBMS.

Database setup

In order to pull database definitions, you must define where the database(s) is/are and what drivers to use to access them. Version 3.5 of the EJBWizard uses a set of generic database definition files. If you are using JOnAS, the EJBWizard can also be directed to a JOnAS server to learn about its databases. This is part of the functionality of the JOnAS "personality module"; presently the personality modules for other appservers don't have that feature.

The master datasource list is the file datasource.properties in the EJBWIZARD datasources directory. This file contains a line which gives the names of the specific datasource (database) definitions files.

Miscellaneous setup

Regardless of what operating system you are running under, the EJBWizard can be customized in a number of ways to support site preferences, user preferences, and project-specific (working-directory) preferences. See Advanced configuration options for specific details.

These preferences are reside in files named "ejbwizard.properties" and their use is layered in such a way that the rules you set up are applied according to an order of precedence, from most-specific to least-specific.

Another powerful feature of the EJBWizard is the ability to create custom template files. Once again, the system is layered. User templates take precedence over appserver-specific templates which in their turn take precedence over the default templates.

In cases where neither of the above are sufficient, it is also possible to extend the EJBWizard with customized Java code. You can write appserver-specific "personality modules", add custom macro functions for use by the code generator, and (in a future release) plug in user-defined tabs to the GUI.