DZone

Starting with Hibernate 5.2.10, the database connection acquisition can be delayed until it’s really needed. For a hyper-sonic guide about Spring transaction propagation, check out Spring Transaction Propagation in a Nutshell. In the case of resource-local (a single data source), Hibernate will acquire the database connection of a JDBC transaction right after the transaction starts (e.g., in Spring, a method annotated with @Transactional acquires the database connection immediately after it is called).

In resource-local, a database connection is acquired immediately because Hibernate needs to check the JDBC Connection auto-commit status. If this is true then Hibernate will disable it.

Source: DZone