Session Bean Implementations

To implement the local stateless bean

  1. import javax.ejb.Stateless;
  2. add the annotation above the class: @Stateless  to see what is the difference between beans check my Choosing and developing a Session Bean

To implement the remote statelful bean

  1. import javax.ejb.Statelful;
  2. add the annotation above the class: @Stateful

To implement the local singleton bean

  1. import javax.ejb.LocalBean;
  2. import javax.ejb.Singleton;
  3. add the annotation above the class:
    1. @LocalBean
    2. @Singleton

Every session bean has:

  1. Business interface
  2. Implementation class
  3. Deployment descriptor information

Leave a Reply

Your email address will not be published. Required fields are marked *