Integrating EJB 3.0 into Web Dynpro Using the
EJB Model Importer
This tutorial
covers all the steps necessary for using existing business functions from
within a Web Dynpro application. The business functions are provided in the
form of an Enterprise JavaBean (EJB) application where the business logic is
implemented through a stateless session bean. In order to use the existing
functions in the Web Dynpro application, we will import a model that
facilitates its usage.
In
this sample application we implement a simple business logic in an EJB 3.0
session bean, while the user interface is developed using Web Dynpro for Java.
The goal of this tutorial is to provide a simple Web Dynpro application which
allows you to get a student’s details (such as age, address) upon
entering the student’s name.
Objectives
By the end of this
tutorial, you will be able to:
-
Set up Development Component (DC) based
projects in the Developer Studio.
-
Prepare Java EE 5 DC projects for use by
other components (such as in Web Dynpro).
-
Generate a model to be used for linking
up the business logic of the EJB DC from within the Web Dynpro DC.
-
Create the context in the controllers in
such a way so that a connection to the model is defined.
-
Define the data binding for the UI
elements.
-
Add the Java code required when
accessing the model in Web Dynpro.
Prerequisites
Systems, installed applications, and
authorizations
-
You have
installed the SAP NetWeaver Developer Studio on your desktop.
-
To be
able to deploy and run the sample application, the application server must be
up and running.
Knowledge
-
You are experienced in working with the
SAP NetWeaver Developer Studio.
-
You have acquired some basic experience
with Web Dynpro applications.
-
You have basic knowledge of the EJB 3.0
programming model.