The
EJB container ensures that there is always only 1 Thread accessing an EJB.
Different threads may be directed to an EJB, but not simultaneously.
This is why you are not allowed to create threads or use synchronization.
It is the turf of the container.
Basically EJB's are similar to the Servlet single thread model.
Of course this doesn't relieve the programmer of any concurrent considerations.
For example:
Don't use instance variables (except resources) in stateless session beans.