Review strategies for loading of enhanced classes in ConfigurationContextImpl

Description

The loading of the newly defined classes should not happen via .load( classloader ) as this breaks depending on different Byte Buddy versions / JDK versions.

We introduced an helper for the same problem in Hibernate ORM called org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState#resolveClassLoadingStrategy.

This was meant as an internal contract for ORM though, so maybe we want to promote it as SPI?

Also this method was only just introduced in ORM 5.3.1.Final so it would require a dependency upgrade if we wanted to use it as-is in OGM.

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Sanne Grinovero

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major