HHH-7116 Pull Request

Added test case exhibiting the bug, and fixed the bug. Saw the following results from ./gradlew hibernate-core:test:


:hibernate-core:test
Test org.hibernate.test.annotations.xml.ejb3.OrmVersion1SupportedTest FAILED
3575 tests completed, 1 failure

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':hibernate-core:test'.


The test report shows that the failing test timed out; apparently a socket was already using a needed listening port; but, the failing test appears to have had no relation to the change that I made.