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
2009-05-21 03:59:36
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
2009-05-21 04:03:07
It's always possible they didn't have a clue.
Charlie Martin
2009-05-21 05:08:56
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
2009-10-18 07:29:13