This topic describes the mechanics of building, and deploying a J2EE project in Developer Toolkit.
In Rational® Developer for System z®, it is recommended that each component of your J2EE application is developed separately in a separate project. For example, if you are developing a dynamic Web project, you typically create a new project for such an application. All components of your J2EE application are included in an enterprise application project which includes the deployment descriptor.
For each project, it is recommended you store all components of a project in a separate type in SCLM. For example, if you have a Web project called WebProject, you should consider creating a type WEBPRJ1, which will be used to store all the source of this particular project.
After you share your project, you need to add the project to SCLM. For information about this function, refer to theAdd to SCLM topic.
The table below lists all the members that are selected in the previous page of the wizard. It is very important you select the correct language type for all members that will be migrated. The table summarizes the language type recommended when you are storing members in SCLM.
| Source type | Language type | Description |
|---|---|---|
| Java™ source | JAVA | Java source whose name will be translated into short name and the contents will be converted into EBCDIC. |
| Java source | JAVABIN | Java source whose name will be translated into short name but their contents will not be translated into EBCDIC (remains in ASCII). |
| Others | J2EEPART | All other text files. Their names will be translated into short names and the contents will be translated into EBCDIC |
| Others | J2EEBIN | These member names will be translated into short names. These files are treated as binary files so that their contents will not be modified when stored in SCLM. |
This step builds all components belonging to a particular J2EE project and creates an archived object such as WAR files for Web projects and JAR files for EJB projects. All components of a J2EE project must be included in an ARCHDEF file which is described in step 1.
To build your project using an existing J2EE ARCHDEF, select Team -> Archdef build.
This brings up the Archdef Build Options dialog. In this dialog, Archdef Name, Archdef type are mandatory fields. These fields should be used to uniquely specify a J2EE Archdef to be used to build your J2EE project. You can click the browse button next to the Archdef Name field to interactively select an Archdef.
The Build at Group field specifies where the members included in the ARCHDEF will be looked up in the SCLM hierarchy and used in the build process. For example, if you select TEST, the build process uses the first occurrence of the members in the SCLM hierarchy starting from the TEST level. The resulting classes, and generated objects , and build map will reside at the build at group.
If you do not have a J2EE build script associated with your ARCHDEF, you can generate the script for your J2EE project. To generate a script, select your J2EE project and select Generate Build Script. This brings up the Build Script Generation dialog.
On this dialog, you need to select the type of build script to generate. You can select one of the following: Java Project, Web Project , EJB Project and EAR project. The type selected should correspond to the type of project you are trying to build.
Using this approach, the generated script will have the language type of J2EEANT and stored under the type of J2EEBLD.
The following table summarizes where the results of various project builds are stored in SCLM.
| Project type | SCLM type |
|---|---|
| Java project | J2EEJAR |
| Web project | J2EEWAR |
| EJB project | J2EEJAR |
| EAR project | J2EEEAR |
The Review generated script option gives you a final opportunity to review and modify the contents of the generated script before adding to SCLM.
For detailed information about project deployment, refer to Deployment services.