IBM Support

Rational Application Developer version 7.5 Best Practices

White Papers


Abstract

This article answers some of the commonly asked questions related to IBM® Rational® Application Developer version 7.5 and provides best practice recommendations on a number of different topics.

Content

* Updated - See Change History.

Table of Contents


Common Best Practices

Migration:

JAR included in lib under EAR project root (click to expand)
Scenario:

You have JAR files that you include in the lib directory under the EAR project root. For Web or EJB projects, you select these JAR files as J2EE Jar/Module dependencies.


With Rational Application Developer 7.5, packages or classes in these JAR files are not accessible in Web or EJB projects; however, the same thing works fine when the JARs are placed directly under EAR root.


Question:


Does Rational Application Developer automatically pick up the files under the lib directory in an EAR?


Answer:


Rational Application Developer does not automatically pick up the files under the lib directory in an EAR.


WORKAROUND:


You may work around this issue by adding the library to your classpath using the Project > Properties > Add JAR option (which will add these JARs to your classpath). IBM Rational is considering automatic recognition of JARs under the lib directory in the classpath in a future version.

Migrate EJB 2.x to EJB 3.0 (click to expand)
Question:

Is there a way to migrate EJB 2.x beans to EJB 3.0 beans?


Answer:


Currently there is no tool provided by Rational Application Developer that enables migrating an EJB 2.x bean to EJB 3.0.


EJB 3.0 provides significant amount of simplification in terms of what is laid down by the specification, as compared to EJB 2.1. You may have a significant amount of EJB 2.x artifacts, but are excited about leveraging the simplicity and power of EJB 3.0.


If this is the case, the recommended approach is to create new artifacts in EJB 3.0, and leverage the power of Rational Application Developer to ensure that these new artifacts work well with your pre-EJB 3.0 artifacts.

How to migrate "some" projects (click to expand)
Question:

You have chosen not to migrate all your projects to Rational Application Developer 7.5. How can you prevent certain projects from being migrated?

Answer:

Close any projects that you chose not to migrate. When you open the project, migration will run for the project.

Removing the .compatibility file (click to expand)
Question:

Do you need the .compatibility file?


Answer:


No.


The .compatibility file is no longer used in version 7.5.


Right-click the project and click Java EE > Remove Obsolete Metadata to properly remove the uneeded files.

Validating migration (click to expand)
Question:

You closed the migration results. How do you determine what happened during the migration?


Answer:


The validation of your migration can be rerun. From the menu bar select Window > Show View > Other ... > Migration > Migration Results. When the view opens, click the green arrow.

Version control and migration (click to expand)
Question:

In previous versions of Rational Application Developer, you did not know which files should be released into your source code management system. Which files should be checked out when migrating in version 7.5?


Answer:


Rational Application Developer 7.5 now ensures that any file that needs to be modified is read/write before proceeding with migration.


Note: Ideally, you should check out the entire project.


On the Migration Project Resources page, you can see which files in the workspace will be modified by the migration process.


To copy a the list of the files, right-click the list and click Select All, then right-click the list and click Copy.

Restarting a failed migration (click to expand)
Question:

The migration failed. Is there any way to restart the migration?


Answer:


Yes.


Restart the workspace or close and reopen the project. Migration will start for any project that requires migration.

Migration and start-up performance (click to expand)
Question:

In version 7.5, since migration runs at start-up, are there any performance issues when starting Rational Application Developer?


Answer:


No.


There are no performance issues. Migration runs on a separate thread, is lightweight and does not block Rational Application Developer start-up.


Validation:

Incremental validation (click to expand)
Scenario:

The validators always run after every build of a project. Similar to the "incremental build", there should be a feature implemented that performs an "incremental validation" where the validation would only validate the changes that have been made since the last validation (or build). For example, if Java code is changed EJB Validator and J2EE Validator do not need to run. 


Question:


Is there a way to incrementally validate parts of a build in version 7.5?


Answer:


There is no EE 5 validation (or any incremental validation feature) in Rational Application Developer 7.5.


J2EE Best Practices


Deployment Descriptor Editors:

Create JAX-WS Deployment Descriptor (click to expand)
Question:

How do you generate JAX-WS deployment descriptor for an application?

Answer:

You can create JAX-WS deployment descriptor by opening up the "Services" folder of the project in the Enterprise Explorer, and right clicking on the service name, selecting the Generate > Deployment Descriptor options.

Example:

Define security roles using EJB 3 DD (click to expand)
Question:

How do you define a security role in an application using the new EJB 3 DD?


Answer:


  1. Open the EJB 3 Deployment Descriptor by double clicking on the DD node in the Enterprise Explorer.

  2. Selecting the root node, add an Assembly node in the DD.

  3. Select the Assembly node and press the 'Add' button. In the list of actions that comes up, you will be able to select the Security Role action.
Define security roles using EAR DD (click to expand)
Question:

How do you define a security role in an application using the new EAR DD?


Answer:


After opening the EAR Deployment Descriptor, select the Application node, and click on Add. You will be presented the Security Role option in the list of Actions.

Binding and Extension descriptors (click to expand)
Question:

How do you generate bindings and extensions descriptors for an application?


Answer:


You can create WebSphere Bindings and Extensions files by right clicking on the project node in the Enterprise Explorer, and from the Java EE Context Menu, selecting the 'Generate WebSphere Bindings' and 'Generate WebSphere Extensions' options.

EJB Security Identity (click to expand)
Question:

You created an annotated EJB 3 Session Bean. How do you create a Security Identity for this bean?


Answer:


Annotated beans do not show up in the EJB Deployment descriptor when they are created. For most wizards invoked through the EJB 3 Deployment Descriptor, you do not need to override the bean in the DD. However, in order to create a Security Identity for an annotated bean, you need to override it in the Deployment Descriptor.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Documentation","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg27013753