The EJB specification requires the EJB container to ensure that:
... only one thread can be executing an instance at any time.
It is up to the provider of the EJB container to comply with this requirement. We don't know how it's done, but what we do know is that every compliant container will do it.
The specification also has some programming restrictions which
you should be aware of:
An enterprise bean must not use thread synchronization primitives to synchronize execution of multiple instances.
The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt to start, stop, suspend, or resume a thread, or to change a thread�s priority or name. The enterprise bean must not attempt to manage thread groups.