Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 

User Guide - Building a (web/enterprise) J2EE application

Index    Previous   <<>>  Next
  
14.1 Overview

14.2 Definition

14.3 Build (compile, package and deploy)

14.4 Running the application

14.5 Saving and loading

  14.1  OverviewTo top of page

One of the major features of JCodeBox is the ability to build and optionally deploy fully functional J2EE applications (enterprise or web) all from within the JCodeBox GUI. Currently there are three types of application available:

  • Java Enterprise (J2EE 1.3 specification)
  • Java Enterprise (J2EE 1.2 specification)
  • Java Web
Application can also have one of two different styles

  • Database
  • Entities defined in this kind of application are defined directly from an existing database schema.

  • Manual
  • Entities defined in this kind of application are defined from scratch using the JCodeBox GUI. Entities are defined in terms of database tables so that JCodeBox can generate the scripts required to create your database schema.

  14.2  DefinitionTo top of page

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 typeTiers
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 WebEIS 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.

  14.3  Build (compile, package and deploy)To top of page

To build an application you use the create application dialog. It presents a number of settings which are described below:

  1. Build process
    • Pre-process
    • This setting is mandatory (carries out pre-processing on your application).

    • Generate
    • This setting is mandatory. (generates your application)

    • Compile
    • This setting is optional. When selected JCodeBox will attempt to compile your application

    • Package
    • This setting is optional. When selected JCodeBox will attempt to package your application into the correct archives (WAR, JAR, etc)

    • Deploy
    • This setting is optional. When selected JCodeBox will attempt to deploy your application to your target application server.

    To start the build process, press the OK. As each section is completed, a green traffic light will appear to the right of the section. If a section encounters problems, a red traffic light is displayed and the build process is stopped. Error details will be displayed in the messages section at the bottom of the dialog.

  2. Deliverables
  3. This section describes what items are created in the target output directory as a result of the build process.

    • Deployment descriptors
    • Created in the dd directory.

    • Java source
    • Created in the src directory

    • JUnit source
    • Created in the test subdirectory

    • Ant scripts
    • Created in the util subdirectory

    • Compiled code
    • Created in the classes subdirectory

    • Database scripts
    • Created in the db subdirectory

    • JSP
    • Created in the web subdirectory

    • Information
    • Readme.txt created in the root directory

  14.4  Running the applicationTo top of page

If you chose to deploy your application and it contained web components, you can run your application.

To do this simply open a web browser and point it to the URL for your application. Note, JCodeBox can attempt to do this for you automatically once the build process is complete if you enable the launch browser after deploy JCodeBox system option.

  14.5  Saving and loadingTo top of page

  1. Saving an application
    • Select the File/Save menu option from the define application dialog menu
    • Select the directory
    • Enter a file name
    • Press the save button

  2. Loading an application
    • Select the File/Open menu option from the main JCodeBox window menu
    • Select the directory
    • Select the file name
    • Press the open button

Index    Previous   <<>>  Next

[an error occurred while processing this directive]