Top
Interstage Studio User's Guide
FUJITSU Software

9.3.1 Overview

9.3.1.1 What is an EJB?

Refer to "3.1.1 What is an EJB?" for an outline of EJB.

9.3.1.2 Changes from Java EE 5

The EJB specification in Java EE 6 is EJB 3.1. The following EJB 3.1 specifications have been improved to achieve even greater simplification of development:

Example (existing definition)

Local business interface definition:

public interface Calc {
    public int add(int param1, int param2);
}

EJB class definition:
@Stateless
public class CalcBean implements Calc {
    public int add(int param1, int param2) {
        return param1 + param2;
    }
}

Used from the client:
@EJB Calc a;

    a.add(1,1);

Example (definition in EJB 3.1)

EJB class definition:
@Stateless
public class CalcBean {
    public int add(int param1, int param2) {
        return param1 + param2;
    }
}

Used from the client:
@EJB CalcBean a;

    a.add(1,1);

Point

Refer to the following specifications for details on EJB 3.1:

  • JSR 318: Enterprise JavaBeans(TM) 3.1

9.3.1.3 Developing EJB

Refer to "3.2.2 Development Flow" and "3.2.3 Development Procedures" for information on the flow and procedures for developing EJB. Refer to "9.6.1 Preparing to Create Applications" for information on preparations for creating annotations.

Note

The wizard names in the standard workbench and the Java EE 6 workbench may be different.
For example: The [Session Bean] wizard becomes the [Session Bean (EJB 3.x)] wizard.