Pramati Technologies

Creating EJB 1.1 Beans

Overview

The Bean Wizard in Pramati Studio helps to create EJB version 1.1. This document describes how to create EJB 1.1 modules with ejbHome, ejbFind, and business methods for entity beans with Bean Managed Persistence (BMP) using Bean Wizard. For more information on how to use Bean Wizard and its panels, read `Creating Entity Beans that use CMP 2.0', `Managing Container Managed Relationships in Pramati Studio', and `Creating Entity Beans with BMP 2.0' which describe the procedure for creating EJB 2.0.

Creating EJB 1.1 modules

To create an EJB 1.1 module:

  1. Create a new desk and select Template as EJB 1.1 Desk. This template contains a EJB 1.1 module, a JAR and a EAR.
  2. Right click on the desk root and select New Folder > Java Module or New Folder > EJB 1.1 Module as per requirement.
  3. Provide appropriate locations for the modules and click OK to apply settings.
Creating session beans

A session bean is a short lived, transaction aware component that is deleted on container crash. Session bean executes on behalf of a single client, and updates shared data in an underlying database. Session beans are of types stateful and stateless. Select Tools > Bean Wizard and provide following details while creating session beans in Expert mode:

    1. Define the type of bean. Select from the dropdown as Session - Stateless, or Session - Stateful. Click Next.
  1. Define Create Methods panel is displayed when the type of bean is selected as Session - Stateful, and transaction type is Bean Managed. Define create methods for the bean. Click Next.
  2. Use Define Business Methods panel to obtain a skeleton code for business methods in the bean. Click Next.
  3. In the Select Bean Interfaces panel, define Home and Remote interface names. Click Next.
  4. Methods to Publish In Interface(s) - Home panel appears when the selected bean is of type Session - Stateful. Selected methods are placed in Home interface. Home and Local Home interfaces for the stateless session beans are created according to EJB specifications. This panel does not appear for Stateless Session beans.
  5. Methods to Publish In Interface(s) - Remote panel displays all pre defined business methods, to be placed in the Remote interfaces. Select as per requirement.

Creating entity beans

An entity bean is a long-lived component that operates in a database on a continuing basis. Entity beans need information on:

The following options appear while creating entity beans in Expert mode:


Pramati Technologies  © Copyright   TOCPREVNEXTINDEX