To implement the local stateless bean
- import javax.ejb.Stateless;
- 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
- import javax.ejb.Statelful;
- add the annotation above the class: @Stateful
To implement the local singleton bean
- import javax.ejb.LocalBean;
- import javax.ejb.Singleton;
- add the annotation above the class:
- @LocalBean
- @Singleton
Every session bean has:
- Business interface
- Implementation class
- Deployment descriptor information