Reentrant Issues

Session beans do not support concurrent access by multiple clients. Stateful session bean instances uniquely belong to a single client and stateless beans belong to a single client while a business method is being executed. The container enforces that only a single thread will be executing inside a session bean instance at a time. It’s the responsibility of the container to serialize the requests, not the bean provider. This frees you from having to worry about concurrency issues related to your beans.

This behavior agrees with the overall purpose of session beans. That is that they are in theory just extensions of a client. Even though session beans are typically used as a service-oriented interface that hides or encapsulates ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 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.