Validating code in enterprise applications
Validation of EJB projects targeted to a WebLogic server runtime is performed in the same manner as it is for other types of projects. For performance reasons, we recommend you disable automatic validation and perform validation of WebLogic projects manually.
The appropriate WebLogic Server EJB Validator is used depending on the version of the project's server runtime. The WebLogic validators check the WebLogic-specific deployment descriptors and also compiles the deploy code. Compilation of the deploy code is required to complete the validation for WebLogic. The performance impact of this is the reason we recommend disabling automatic validation.
A WebLogic Server WebSphere Extensions Compatibility Validator verifies that the EJBs being validated do not implement WebSphere Application Server extensions that are not compatible with WebLogic Server. In particular, WebLogic Server does not support:
- WebSphere Application Server EJB 1.1 relations.
- Bean class inheritance.
- Primitive key fields when the bean participates in a one-to-many relationship.
Prerequisite: The EJB project must be targeted to a WebLogic server runtime.
Disabling automatic code validation
To disable automatic code validation for a particular project:
- Select the project for which you want to disable automatic code validation.
- Right-click and select Properties. The Properties dialog appears.
- In the tree view of the Properties dialog, click Validation. The Validation page opens.
- Ensure that the validators that you want to run are checked.
- Uncheck Run validation automatically when you save changes to resources. This checkbox is only enabled when both of the following conditions are met:
- The Build automatically checkbox is selected under Workbench in the Preferences dialog. And,
- The selected project supports automatic validation.
- Click OK.
To disable automatic code validation in global preferences:
- From the Window menu, select Preferences.
- In the Preferences window, select Validation. The Validation page opens.
- Ensure that the validators that you want to run are checked.
- Uncheck Run validation automatically when you save changes to a resource. This checkbox is only enabled when the Build automatically checkbox is selected under Workbench in the Preferences dialog.
- Click OK.
Related concepts
Enabling WebLogic support