Stateful session Bean: each user has its own unique instance, during the lifetime of the user, the bean maintains the user's information, namely "stateful"; Once the user dies (the end of the call or the end of the instance), the bean's lifetime ends. That is, each user will initially get an initial bean.
Stateless session Bean:bean Once instantiated, they are added to the session pool and can be shared by individual users. Even if the user has died, the lifetime of the bean does not necessarily end, it may still exist in the session pool for other users to invoke. Because there is no specific user, it is not possible to maintain a user's state, so called a stateless bean. However, a stateless session bean is not stateless, and if it has its own attributes (variables), then these variables will be affected by all users who invoke it, which must be noted in practical applications.
Spring's stateful bean and stateless bean