I am new to Doctrine Symfony framework and want to understand how entity manager works in multi-threaded environment.
I have service class called ProxyDelegator which is called every time service method is called.
app.ProxyDelegator:
class: Acme\SampleBundle\Controller\ProxyDelegator
arguments: [@doctrine.orm.entity_manager]
This class will receive entity manager passed as above and create the transaction and then it invoke the service method with reflection. This will help developers not to handle transaction management every time.
So the flow will be Controller -> ProxyDelegator (Create Transaction from entity manager) -> Service Method (invoked from ProxyDelegator using reflection).
My question is will it create the new entity manager for every new client request? If not how should I handle this scenario?
Thanks in advance.