tags:

views:

406

answers:

2

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

+1  A: 

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.

Rob Di Marco
Yeah thats fine, but somebody asked this question in a interview and I replied in the same way but he wasn't satisfied with my answer.
Garhwali Bhai
It's always possible they didn't have a clue.
Charlie Martin
A: 

Does it mean that there are no concurrency problem when invoking EJBs?

If I have to implement readerS and writer pattern I could left to the native sync of EJBs the task to sync them?

robob