Generating the deploy code
Previously to Java EE 5, deployment code had to be generated to be able to deploy the EJBs to an application server. This is not necessary for Java EE 5 applications. So if you EAR contains only Java EE 5 applications you do not have to generate deployment code. However, if you have a mix of EJB 2.x and EJB 3.0 in your EAR then deployment code would need to be generated for the EJB 2.x projects.
Generating the deploy code is done as follows:
| Make sure that you have selected the correct backend folder in the deployment descriptor of the EJB 2.x projects, either Derby or DB2. Deployment code is generated for the selected mapping (backend folder).
|
| Deployment is required for EJBs 2.x. This can be performed in the IDE now, or when installing the application on the server.
|
| In the Enterprise Explorer, right-click the EAR project and select Prepare for Deployment. For a Java EE 5 EAR project deployment code is only generated for the EJB 2.x modules it contains.
|
You can also directly right-click the EJB 2.x projects and select Prepare for Deployment (the Web modules do not require deployment).