The service layer contains controllers and, in the J2EE layer architecture, session beans represent these controllers. In the session bean Facade design pattern, session beans always mask entity beans.
Session beans represent the use cases and can therefore delimit transactional boundaries.
This object positioning leads to a service-based architecture where the session beans, which represent workflow, control entity beans. Session beans are therefore an extension of the client on the server-side. In a stateless session bean, the bean does not maintain state between method calls. Stateless session beans, more complex to design, typically require numerous method parameters to be passed in, which typically involves heavy network traffic. Conversely, stateful session beans do maintain state with the client.