The code in the method SearchConfigurationFromHibernateCore#getReflectionManager() was written for the old Hibernate and does not work anymore with Hibernate 5. The ConfigurationService class from Hibernate does not have the method "getReflectionManager". And therefore the method SearchConfigurationFromHibernateCore#getReflectionManager() falls back to create its own instance of JavaReflectionManager. This leads to higher memory consumption.
I have prepared a pull request for this issue. But merging the pull request breaks the WildFly integration tests with following message:
To fix this error the definition of the Hibernate module in WildFly must be changed to export the "org.hibernate.commons-annotations" module (s. attached patch for details).