Can a stateless session bean maintain state?
Yes. A stateless session beans can contain non-client specific state across client-invoked methods. For example, states such as socket connection, database connections, reference to an EJBObject, and so on can be maintained. However, they cannot have state specific to any client across client-invoked methods.
In which tier should client state be maintained?
In a typical transactional J2EE application, client state should be maintained in the EJB tier. A stateful session bean is used to manage workflow and maintain state during client interactions.
How does the container recognize the session bean type?
The EJB container recognizes the session bean type from the bean's deployment descriptor(ejb-jar.xml).