O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15.4. Thread management

In short, don’t do it. It is the job of the EJB container to ensure that your EJB instance is entered on only one thread at a time, unless the container knows that it is safe to relax this restriction. You should write code as if the EJB were running in a single-threaded environment. The mechanism that the container uses to achieve this illusion of single-threaded operation while maintaining adequate responsiveness is at the discretion of the container vendor. Typically, it will use multiple instances of EJBs with one thread assigned per instance. If there are not enough instances available, then the container will queue method invocations until one becomes available.

Because entity EJB instances and EJB objects are shared ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required