6.10. Summary

Session EJBs are models of services provided to clients or encapsulations of business logic. They are not expected to be persistent, although they can interact with databases and other data sources, and can be involved in transactions. Stateful session EJBs model a sequence of interactions between the same client and the service, and can maintain data on behalf of the client. Stateless session EJBs model simple client-server interactions where no data is stored on behalf of the client. Stateless session EJBs are much more efficient to use than the stateful variant, as method calls from any client can be dispatched to any instance.

Get Applied Enterprise JavaBeans™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.