Creating A Stateless EJB

  1. Select File > New > Other... from the Eclipse menu.

  2. Browse to EJB 3.0 > Session Bean and click the Next button.

    EJB 3.0 > Session Bean

  3. In the Create a new EJB 3 Session Bean dialog, enter the following:

    The Bean Package field: by.iba.ejb

    The Bean Name field: StatelessCalculator

    NOTE: make sure Stateless Session Bean Type radio button is selected.

    Click the Finish button.

    Session Bean - Finish

  4. The wizard has created two files: the Bean Implementation Class (StatelessCalculatorBean.java) and the Bean Remote Interface (StatelessCalculator.java):

    Bean Implementation Class and Remote Interface

    StatelessCalculatorBean class:

    package by.iba.ejb;
    
    import javax.ejb.Stateless;
    import by.iba.ejb.StatelessCalculator;
    
    public @Stateless class StatelessCalculatorBean implements StatelessCalculator {
    
    }
    								

    StatelessCalculator interface:

    package by.iba.ejb;
    
    import javax.ejb.Remote;
    
    @Remote
    public interface StatelessCalculator {
    
    }
    								

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine