Be sure to use the corresponding compliance setting: hibernate.jpa.compliance.closed. The "infrastructure" is already in place, you can just check:
SessionFactory sf = ...; sf.getSessionFactoryOptions().getJpaCompliance().isJpaClosedComplianceEnabled()