EntityManager
is not thread-safe by definition.
Servlets specs says that in non-distributed environment and without implementing SingleTh
Question 2, 3, and 4 -- Spring does not pay attention to any class that is not a Spring Bean. Therefor Spring does not pay attention to you MyServlet
class.
Therefore the answer for
For Question 1). It works this way, so the usage of an Spring Injected Entity Manager is effective thread save.