Show TOC Start of Content Area

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

Use

This tutorial shows you how to implement the business logic layer of the Project Management and Employee Services application. It uses the ProjectManagement Session bean as an example. Using the the same procedure, you can implement the rest of the session beans copying the source codes from Reference.

Procedure

To develop the ProjectManagementService bean, you need to go through the following steps:

...

       1.      Creating the ProjectManagementService Session Bean

Using the session EJB wizard, you create the bean with its main requisites, such as session type and access type of the business interface.

       2.      Implementing the ProjectManagementService Session Bean

                            a.      Inject resources into the environment.

You inject the persistence context to provide access to the EntityManager (EM) and use the EM’s API to work with queries in the bean’s business methods. You also inject a reference to another session bean, as well as make a session context available to the ProjectManagementService bean.

                            b.      Write queries to the database.

You use the EM APIs to implement the bean’s business methods that send queries to the database.

                            c.      Expose the business methods to the business interface.

You use the Developer Studio tools to add the bean’s methods to its local business interface.

End of Content Area