In this document you can find the differences between the wizards for creating Enterprise JavaBeans (EJB) 2.1 components and Enterprise JavaBeans (EJB) 3.0 components in the Developer Studio. They are both created using the EJB project wizard but with different project facets for each version.
1. Create an EJB Project
Choose the pushbutton.
Select Next .
, then chooseIn the EJB module version field, select 2.1 .
Specify the desired additional settings.
(Optional) To configure the project facets, choose Modify in the Configuration area.
You can add Java Persistence and EJBDoclet facets.
You can change the project facets later at any time by choosing
in the project context menu.In the Target Runtime field, select SAP Libraries . This automatically sets the necessary libraries for building the project as specified in the Configuration field.
Choose Finish .
For more information, see Creating EJB Projects in the Developer Studio .
2. Create Session and Message-Driven Beans
The wizards for creating enterprise beans in EJB 2.1 components are different from those in EJB 3.0 components.
In EJB 2.1 components you can create enterprise beans using the same wizard. Unlike EJB 3.0 components, in EJB 2.1 components you can create not only session and message-driven beans, but entity beans as well.
In the context menu of the EJB project, choose
.In the first page of the New EJB wizard, enter the EJB Name and select the Bean Type .
The entity beans are no longer part of the EJB 3.0 specification. You can create them only in EJB 2.x components.
(Optional) Specify additional settings of the EJB.
Choose Finish .
For more information, see:
3. Edit Deployment Descriptors
When you create an EJB 2.1-compliant project, the Developer Studio automatically creates both ejb-jar.xml and ejb-j2ee-engine.xml . You can use the multipage editor for editing the deployment descriptors to configure your EJB components.
For more information, see: