Session Bean in java Tutorial for beginners and professionals. there are 3 types of session bean in java: stateless session bean, stateful session bean, singleton, session bean.
Session bean encapsulates business logic only, it can be invoked by local, remote and web service clients.
It can be used for calculations, database access, etc.
The life cycle of the session bean is maintained by the application server (EJB Container).
Types of Session Bean
There are 3 types of the session bean.
1) Stateless Session Bean: It doesn't maintain the state of a client between multiple method calls.
2) Stateful Session Bean: It maintains the state of a client across multiple requests.
3) Singleton Session Bean: One instance per application, it is shared between clients and supports concurrent access.