Spring boot Open session in view

I wondering how spring boot handle entity manager and thread in case open session in view in enabled.

From what I understand entity manager is created at the beginning of the request and spans multiple transaction.
Does it means that each method annotated with @Transactional is injected with the entity manager created at the beginning of the request? and what if a new thread is started that calls @Transactional method does it get the same entity manager from the beginning of the request or a new one? I’ve read thta Entity Manager is scoped to JTA transaction in containers like spring… totally confused

Thank u in adance

The entity manager lifecycle is bound to the thread for the HTTP request. A transaction scope is entered when entering a method annotated with @Transactional and exited when exiting that method. Within that scope, the transaction is running, but subsequent transactions could suspend outer transactions.

As you hopefully understand, there will only be a single entity manager. Anyway, I would suggest you verify this yourself by debugging and setting a break point into SessionImpl to see when a new entity manager is constructed.