Debu already covered the major cases for using session beans. In a highly message oriented environment, MDBs have obviuos uses. Some other issues to consider are basic AOP support through interceptors, a more clearly defined boundary for exposing the high level application API as web services, declarative security, and the like. Anothjer subtle issue people often forget is thread-safety.
Not all parts of the JPA API is thread-safe by default, whereas session beans are. If you are not careful, you can easily expose a non-thread safe JPA object into a non-thread safe context (such as the HTTP session).
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
bacon. tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user