< Previous | Next >

OSGi EJB tutorial

This tutorial shows you how to create an OSGi application that exposes an EJB as a service. You learn how to create OSGi bundles with EJB support, use the OSGi tools to manage EJB exports, and create a servlet that accesses the EJB as an OSGi service. You create the same application that is demonstrated in the OSGi EJB temperature converter sample.

Learning objectives

Important: Applicable to WebSphere® Application Server traditional

In this tutorial, you learn how to create an OSGi application that exposes an EJB as a service. It demonstrates how to create OSGi bundles with EJB support, use the OSGi tools to manage EJB exports, and create a servlet that accesses the EJB as an OSGi service. This tutorial shows how to create the same application that is demonstrated in the OSGi EJB temperature converter sample.

The application that is developed in this tutorial is a simple temperature conversion application that requires four projects:
  • An OSGi application, ConverterApp, to include the bundles that are developed.
  • An OSGi bundle project, EJB, that has EJB support. The EJB is exposed as a service by using the OSGi header Export-EJB.
  • An EJB client project, EJBClient, to contain the interface code for the EJB. EJBClient has OSGi bundle support.
  • An OSGi bundle project, Web, that has Web 3.0 support. This project includes a servlet that is configured to access the EJB that is exposed as an OSGi service.
To complete this tutorial, you need approximately 60 minutes.
< Previous | Next >
Icon that indicates the type of topic Tutorial topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: osgi_ejb_abstract.html