Top
Interstage Studio User's Guide
FUJITSU Software

3.3.2 Creating Session Beans

To create session beans, use the Create EJB 3.0 Session Bean wizard to create the session bean class source file and implement the business methods in the file. The method is described below.

Creating Session Bean Classes with the Create EJB 3.0 Session Bean Wizard

From the [New] wizard, select [EJB] > [Session Bean], and the wizard creates the session bean. Refer to the following for the wizard settings:

When the wizard is executed, the Java source of the session bean class and the business interface is generated.

Implementing the Business Method

After the source is generated, implement the business method in the session bean. The procedure for implementing the business method is as follows:

  1. Code the method declaration in the business interface.

  2. Code the implementation of that method in the session bean class.

The method declared in the business interface is automatically handled as a session bean business method.

The methods for declaring and implementing these methods are the same as for ordinary Java interfaces and Java classes. Use the Java editor to declare and implement the methods.