Generating EJB deployment code from the workbench
Before you can successfully run your enterprise beans on either a test or production server, you need to generate deployment code for the enterprise beans.
Note: If your EJB project contains CMP beans that have not been mapped, a default top-down mapping is created when you generate the deployment code.
Important:
- Make sure that your bean classes compile cleanly (that is, there are no compilation errors). Then run validation. Now, you can deploy the beans.
- If you have turned automatic validation off, it is strongly recommended that you manually validate your enterprise beans before you generate deployment code for them. If you validate your beans and any validation errors are reported, not generate deployment code until the errors are fixed. However, if you validate your beans and only warning or information messages are received, you can generate deployment code for the beans.
- You can generate deployment code either for individual enterprise beans that you have modified or added newly to the project or you can generate deployment code for the entire EJB project. Note however, that when you generate deployment code for the entire project, the EJB deployment tool picks up only the new entities or changes that have been made to the project.
To generate deployment code for an EJB project:
- If you have changed the class path of any EJB project, ensure that your EJB project's source folder appears at the beginning of the project's class path. (The EJB Import wizard imports both the JAR file and the JAR file's source code into the workbench, so the correct order of the entries on the class path is an important consideration.)
- In the Project Navigator view, right-click the project or EAR file that contains the enterprise beans for which you want to generate deployment code, then select Deploy.
- By default, the deployment code is generated in the ejbModule source folder.
Restriction: Do not specify a directory name as ejbModule. The directory name, ejbModule, is a reserved name for the EJB deployment tool when generating enterprise bean deployment code.After the deployment code is generated, you can export your enterprise beans to a JAR or EAR file for installation on an EJB server, such as the WebSphere Application Server.
Parent topic
EJB deployment tool
Parent topic
Running the EJB deployment tool
Related tasks
Adding SQLJ support to Java projects
Generating EJB deployment code from the command line
Deleting deployment code
Related reference
Limitations of EJB deployment