To define an application you use the define application dialog. This dialog can be invoked in different ways:
Database Applications
Either:
- In the main JCodeBox window, double click on the driver that contains the connection to be used
- In the main JCodeBox window, double click on the connection that contains the database/schema to be used
- In the main JCodeBox window, right mouse click on the schema you would like to use
- Select Generate from database and then select the type of application from the popup menu
- The define application dialog is displayed
Or
- Select the Database/Generate from database menu option from the main JCodeBox menu and then select the type of application
- Select the driver to use and press next
- Select the connection to use and press next
- Select the catalog/schema (database) to use and press finish
- The define application dialog is displayed
Manual Applications
- Select the Generate menu from the main JCodeBox menu and then select the type of application
The define application dialog is split into two parts. The top half contains properties for your application (name, description, etc).
The bottom half displays the tiers available in your application. To add components to your application, you add them to the tiers.
For further information on adding components see chapters 7 Tiers, 8 Entities, 9 Enterprise Java Beans, 10 Web components and 11 Web
services.
Each application type has the following tiers available:
| Application type | Tiers |
| Java Enterprise (J2EE 1.3 specification) | EIS tier Business Tier Web Tier Web services Tier |
| Java Enterprise (J2EE 1.2 specification) | EIS tier Business Tier Web Tier Web services Tier |
| Java Web | EIS tier Web Tier Web services Tier |
The properties available to applications are described below:
- Application name
The name of the application.
- Application description
A description of the application.
- Base package
The base java package (i.e. com.jcodebox) to use for code generated by your application. Note that this base package is prepended
to all package names entered for components/classes/interfaces defined in your application (i.e. EJBs).
- Target directory
The directory all generated items (code, descriptors, scripts, etc) should be put in.
- DataSource JNDI
The DataSource JNDI to use for the application. For enterprise applications, it is important to set this value before defining any
entity EJBs. JCodeBox will use this value to pre-populate the DataSource JNDI property for all entity EJBs and will also create the
necessary resource reference.
- Target application server
The application server your application is to be deployed in.
- Target database
The database your application will communicate with.
When you are ready to build (and optionally deploy) your application, press the create button. The create application dialog
is displayed.