When running in standalone (non JEE) environment with the default Hibernate configuration, I'm seeing this behavior regarding Hibernate's use of underlying DataSource's connections:
commit() will commit and close the JDBC connection, then it will reopen it, set it to autocommit false and close it immediately.
I instrumented DataSource and Connection classes to print when their methods are called.
Here is the full code:
And here is the full output: