B.Singh B.Singh - 14 days ago 6
Java Question

EJB and Synchronization

Are Session Beans (stateless session beans, stateful session beans) Synchronized?

Answer

Only one thread at a time will be accessing your beans. It is up to the application server to manage this. So you should not be using synchronized from within your beans. This is why a non-threadsafe like EntityManager can be an instance value and not have synchronization issues.