spring transactional nested open session?

641 views Asked by At

If a method of service is marked as @Transactional with propagation nested, and inside it there are many calls to other @Transactional methods, each one of these methods will use its own session? It should represent many connections to db for just one method call no?

1

There are 1 answers

6
Harshal Patil On BEST ANSWER

It looks like PROPAGATION_REQUIRED is better option for your purpose. From its javadoc:

Support a current transaction; create a new one if none exists.

Refer this link for more details