Copyright © 2006 Together Teamlösungen EDV-Dienstleistungen GmbH
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the Together Teamlösungen EDV-Dienstleistungen GmbH.
Together Teamlösungen EDV-Dienstleistungen GmbH DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents
Kelp provides wizards and tools that help you develop Enhydra applications from within your Eclipse IDE.
The Kelp Application Wizard speeds up project development by generating the framework and source files for new applications and components. The Kelp Application Wizard uses two generators to create Enhydra projects: the Web Application generator and the Enhydra Application generator.
Web application (Servlet 2.3 compatible).
Enhydra application (super-servlet style application).
To generate Enhydra Project from within Eclipse IDE, select 'File -> New -> Project' to launch New Project Wizard Selection Dialog.
Open Enhydra three branch and select 'Enhydra Project' wizard. After that click on the 'Next >' dialog button.
On this dialog you can set Enhydra Project name and select project root directory path. After completing this step click on the 'Next >' button again.
At this point you can administer 'Java build settings' of your new Eclipse-Enhydra Project.
Source folders on projects build path.
Required projects on the build path.
JARs and class directories on projects build path.
NOTE: All initial entries are not contained in the projects file structure but they are externally referenced to your Enhydra or Enhydra Enterprise Server and JRE installation.
Build class path order and export entries (Exported entries are contributed to dependent projects)
Default output directory
You can accept default project build settings and click on the 'Finish' button.
At the end of the Eclipse project definition 'Enhydra Application Wizard' is started. Navigate through the wizard and select the options and naming conventions for your generated files.
When you have finished setting the options you want, click 'Finish' to generate your application or service.
Table of Contents
The XML Compiler dialog calls XMLC, which compiles HTML, CHTML, WML and XHML files into DOM classes. To open the dialog, select 'Enhydra Tools -> XML Compiler' menu option. The tool is available only when a enhydra project (or one of its resources) is selected.
The dialog box has three primary tabs: Selections, Options, and Output.
The Selections tab displays all files in the currently selected project ('resource' directory of its presentation layer) that are recognized as compilable by XMLC. You can use the single arrow buttons (< and >) to add or remove files from the list selected to be compiled. Use the double arrow buttons (< < and > >) to add or remove all files from the selection list. Select the Show Full File Path check box to display the full path of the files.
The Options tab displays additional tabs for compile, XMLC types, and trace options.
You can choose to invoke XML Compiler during projects 'Ant Rebuild' process (call XMLC without opening the XML Compiler dialog).
Verbose output option will let you display detailed information during the compile process.
Mappings package setting sets the package of newly generated java classes.
XMLC options let you customize the generated DOM classes. XML Compiler options are stored in 'options.xmlc' file.
The Output tab shows the results of running XMLC based on the files you selected on the Selections tab. For information on the Output tab, see "Setting output options".
One common option is to use a mapping table to customize generated class names. Unless your HTML files are stored in the same directory as your presentation package Java source files, you need to use the mappings option to map the resource document directory to the presentation package name.
NOTE: The Enhydra guidelines recommend that you keep your XMLC documents in a resources directory and map them to the presentation package when you are generating the DOM classes. Enhydra Kelp sample project stores HTML files in a separate resources directory!
Projects XMLC mappings can be set on the 'Options' tab ('Mappings' section).
The Output tab is automatically selected when you click Compile in the XML Compiler dialog. This tab contains a scrollable text area that displays the results of the compile process. If you have any errors in your HTML files, the problems appear on this tab. You can optionally save the output to a text file by selecting 'Output To Log File' and entering a file name.
The Output page displays the files that are created during the compilation process. If an HTML file contains a new error, the associated Java and class files are not regenerated.
Table of Contents
The Kelp Deployer lets you quickly configure projects for your current environment and directory structure. The Kelp Deployer helps you perform the following four tasks:
Generate configuration files and deployment descriptors from input templates
Copy static content to your document root
Create a deployable archive, based on the type of application or component
Set up your project so you can launch Enhydra with your application
This tab sets and displays basic information about deployment. The messaging options control how status messages are handled during deployment.
Deploy Destination Directory -- Deploy destination is used for setting the ANT build project output directory. Click the 'Browse...' button to navigate to a folder.
Deploy During Project 'Ant Rebuild' check box--Select Deploy During Build to deploy your application on each project rebuild. The Show Messages box is enabled if Check Deploy During Build is selected. If Show Messages is selected, deployment messages will be shown in the Output tab.
Make WAR - indicates whether to make application WAR binary as final result of application deployment process.
Template Path points to the location of your project's .in files, which are template files. These files are processed and copied to your Deploy Destination folder using relative paths.
Documents --The Documents tab lets you view the list of files in your project which will be processed.
Select Show Full File Path to show the full path of each template file.
Replacements--The Replacements tab lets you adjust the template settings for your project. Templates have the extension .in. Templates are text files with place holders that are replaced with system-specific information by the Kelp Deployer. One of the default place holders, @DEPLOY_PATH@, is replaced with the current project deployment directory specified.
You can change the order for replacements using the 'Move Up' and 'Move Down' buttons. Items at the top are replaced first. The 'Reset' button sets the 'Replacements' table back to the default values.
Show Full File Path--Displays the full path for files
Input Templates (.in) Only--If not checked, you can have the Kelp Deployer copy (without searching and replacing strings) all non-template (.in) files from the input root directory to the deploy root directory.
Enable Input Deployment--Enables or disables input deployment. If you are using auto-deploy, you can normally disable input deployment.
The Kelp deployer will copy content types from the 'content source directory' to the 'content destination directory'.
Paths -- If you Select Enable Content Deployment, you can select the directory containing the static content files you want to deploy with your Web application.
Content Source -- The directory that contains the static content files for your project. These static files will be copied to your document root using relative paths.
Content Destination -- The directory in which application static content will be copied.
Types--The Content Types sub tab shows the extensions of static resource files that will be copied from the Content Source directory to your document root directory. Click 'Add' to enter a new extension. Select an extension and click 'Remove' to keep files with that extension from being copied. Click 'Reset to go to the default values of recognized extensions.
The Output tab is automatically selected when you click 'Deploy' button in the Deployer dialog. This tab contains a scrollable text area that displays the results of the application deployment process. If you have any errors during application deployment process, the problems appear on this tab. You can optionally save the output to a text file by selecting Output To Log File and entering a file name.
Table of Contents
After you have generated and built a Web application, you can deploy the Web application archive (WAR) in a few different ways using the Kelp Deployer.
Enhydra Appwizard can generate scripts for running your application locally in an isolated instance of the Enhydra Server. This instance of the Enhydra Server loads current server configuration to run your Kelp application.
Enhydra Server startup and shutdown scripts are placed in 'bin' sub folder of Kelp application output directory (default path is '<project_root>/application/bin/application').
Hot deployment consists of deploying an application or component to a running instance of Enhydra. This is something that can be done from Tomcat and Enhydra Manager application. For more detail information regarding this procedure, please, refer to Tomcat, JOnAS and Enhydra Server documentation.
Open 'create, manage and run configurations' dialog
You can get this dialog for every Eclipse project several ways:
Right click on the project or one of its resources in projects three -> 'Run As (or Debug As)' -> 'Run... (or Debug...)'
Select project (or one of its resources) -> 'Run (Main Menu Option)' -> 'Run... (or Debug...)'
This option is enabled in 'Java', 'Debug' and 'Java Browsing' project perspective.
Select project (or one of its resources) -> 'Run (or Debug) ToolBar Menu' -> -> 'Run... (or Debug...)'
Every of those directions will lead you to 'create, manage and run configurations' dialog.
Create new 'Enhydra Application' run configuration
If you have (before run configuration dialog initialization) selected Enhydra Application project (or one of its resources), newly created run configuration will be already (pre)configured:
Main Tab
Project - if not defined, please browse for your Enhydra Application project.
Main class - Server startup class:
org.apache.catalina.startup.Bootstrap (Enhydra Server)
org.objectweb.jonas.server.Bootstrap (Enhydra Enterprise Server)
Arguments Tab
Program arguments
start (Enhydra Server)
org.objectweb.jonas.server.Server (Enhydra Enterprise Server)
VM arguments
Enhydra Server JVM parameters: -Djava.endorsed.dirs=<enhydra_root>/multiserver/common/endorsed -Dclasspath= -Dcatalina.base=application/bin/application -Dcatalina.home=<enhydra_root>/multiserver -Djava.io.tmpdir=<enhydra_root>/multiserver/temp
Enhydra Enterprise Server JVM parameters: -Dinstall.root=<enhydra_root> -Djonas.base=application/bin/application -Djava.security.policy=<enhydra_root>/conf/java.policy -Djonas.classpath= -Djonas.default.classloader=true -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory -Djava.security.auth.login.config=<enhydra_root>/conf/jaas.config -Djava.endorsed.dirs=<enhydra_root>/lib/endorsed -Daxis.jaxrpc11Compliance=true
JRE:
Project JRE (JRE version)
Source (Source Lookup Path)
JRE System Library conf (Enhydra Server configuration directory reference) bootstrap.jar (Enhydra Server JAR binary) application classpath (for debug purposes)
JRE System Library conf (Enhydra Server configuration directory reference) ow_jonas_bootstrap.jar (Enhydra Enterprise Server JAR binary) application classpath (for debug purposes)
Classpath
JRE System Library conf (Enhydra Server configuration directory reference) bootstrap.jar (Enhydra Server JAR binary)
JRE System Library conf (Enhydra Server configuration directory reference) ow_jonas_bootstrap.jar (Enhydra Enterprise Server JAR binary)
Common (general eclipse project configuration - default eclipse setting)
Once you have your Run/Debug configuration set, you can start internal Enhydra (Enterprise) Server instance with Enhydra Application deployed in it.
NOTE: Same configuration can be started in 'Run' or 'Debug' mode
When Enhydra server is finished booting, access the application with a browser at the following URL:
http://localhost:<conn_port>/<app_name>
You should see the 'Welcome.html' page with a redirect and a dynamic time stamp.
You can start dods in Dods Generate window with one of the following parameters:
Invoke DODS during project ant rebuild
Whether to invoke DODS generator during projects 'Ant Rebuild' process or not.
Configuration directory
Path to the DODS configuration directory. By default references external (Enhydra Server) directory.
Output directory
Target for generated java sources, expressed as a directory path.
Doml file
The doml input file describing data object mapping.
Documentation section
There is a possibility on the Generator Wizard for generating the following types of documentation:
HTML:
If you check this field, doml file will be converted into html file.
PDF:
If you check this field, doml file will be converted into pdf file.
XMI:
If you check this field, doml file will be converted into xmi file.
PTL:
If you check this field, doml file will be converted into ptl (Rational Rose) file.
Template set
Selected template set depends on <template_set> tag in doml file. If this tag is not set, default template set is "standard". If this tag is set, the value of this tag will be selected in template set combo box.
Template set combo box contains possible template sets:
standard:
If this template set is chosen, DODS generates standard code.
<user_defined_templates>:
Users can define their own template sets.
Overwrite
Whether to overwrite already existing files or note during DODS generation process.
DB vendor combo box
Contains list of database vendors. If one of these vendors is selected, this database will overwrite database declared in doml file. Possible database vendors are:
MSQL
Oracle
Informix
Sybase
MySQL
PostgreSQL
MckoiSQL
Standard
DB2
QED
HypersonicSQL
InstantDB
Generate SQL:
This field should be checked if you want to generate: SQL files for each table separately, one cumulative SQL file for creating all tables (SQLcreate.sql), and one file for deleting those tables (SQLdrop.sql).
SQL Splitter:
It is used for creating separated cumulative SQL files (for creating tables, for adding foreign keys, primary keys and for deleting tables). This option enables creating tables without cross references, and after their creation, adding needed references.
SQL Splitter copies all SQL commands from all SQL files which are situated in the working directory and all its subdirectories into SQL files.
Original SQL files are created by DODS.
All SQL commands are copied into file separateCreate.sql except sql commands which reference to foreign and primary key columns.
In the separateIntegrity.sql file class puts ALTER TABLE sql commands with adding foreign key references.
In the separatePrimary.sql file class puts ALTER TABLE sql commands with adding primary keys.
In the separateDropTable.sql file class puts DROP TABLE sql commands for all tables which were created by create table SQL statements in the first file (separateCreate.sql).
In the separateIndex.sql file class puts CREATE INDEX sql commands for all tables which were created by create table SQL statements in the first file(separateCreate.sql).
In the separateDropIntegrity.sql file class puts DROP foreign key sql commands for all tables which were created by create table SQL statements in the first file (separateCreate.sql).
In the separateDropPrimary.sql file class puts DROP primary sql commands for all tables which created by create table SQL statements in the first file (separateCreate.sql).
In the separateDropIndex.sql file class puts DROP IDEX sql commands for all tables which created by create table SQL statements in the first file (separateCreate.sql).
All others Sql commands class puts into separate file.
Unless Generate SQL field is checked, this field can not be checked. If this option is checked, Generator Wizard doesn't create cumulative SQL files.
Generate Java:
This field should be checked if you want to generate Java files (DO, Query, DOI and DataStruct objects).
Compile Java:
It is used for compiling generated java files. Compiled files will be located in folder <output_directory>/classes. Unless Generate Java field is checked, this field can not be checked.
If you do not need both Java and SQL generation, you can choose one of them instead of both. At least one of the 'Generate' fields must be checked.