Show TOC Start of Content Area

Procedure documentation Creating Stateless Session Beans  Locate the document in its SAP Library structure

Use

This describes the wizard. Enterprise beans can also be created quickly through the context menus of the relevant projects.

Prerequisites

An EJB project exists. See Creating EJB Projects.

Procedure

       1.      Choose File New Other.

       2.      On the left pane of the first wizard page, choose J2EE EJB, and on the right pane, select EnterpriseBean.

       3.      Choose Next.

       4.      In the EJB Name field, enter a name for your new session bean.

       5.      In the EJB Project field, select the project to contain the session bean.

       6.      In the Bean Type field, select Stateless Session Bean.

       7.      In the Default Package field, enter a package.

If the package does not exist, you can create it now.

       8.      Select Generate default interfaces. The wizard will create all possible bean interfaces.

Alternatively, deselect Generate default interfaces. You will then be able to specify the interfaces to be generated (and their names and packages).

       9.      Choose Next.

   10.      Add superclasses or superinterfaces if required. This depends on the custom logic of your application. The J2EE specified bean interfaces are already added to the bean.

   11.      Choose Next.

   12.      Add new methods.

You can miss out this step and add the methods later during editing.

For each new method, select the type of method and choose Add. Enter the name and return type, and specify the parameters.

   13.      Choose Finish.

Result

You can see the bean in the ejb-jar.xml node of the relevant EJB project in the J2EE Explorer (for normal projects) or J2EE DC Explorer (for DC projects).

You can now edit the session bean.

 

See also:

Editing Enterprise Beans

Creating and Editing the Enterprise Beans’ Methods

 

End of Content Area