Reputation: 12110
If I annotate a method that is executed in a thread with @Transactional, will a Session be created and bound to the thread?
Upvotes: 2
Views: 364
Reputation: 597016
Yes. The proxy (TransactionInterceptor
) is around the service, so for each invocation of a service method it will start a thread-local transaction.
I would advise you to use spring 3 @Async
so that you leave the thread creation to the container (spring).
Upvotes: 4