You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Jakarta EE container can only get hold of the ClassTransformer for a persistence provider after the persistence unit has been started. The provider has to call PersistenceUnitInfo.addTransformer(). This is a pretty weird design and results in chicken/egg dependencies for the container.
But we can solve this problem by decoupling the lifecycle here, and adding a method PersistenceProvider.createClassTransformer(PersistenceUnitInfo), allowing enhancement and bootstrap of the persistence unit to occur in two phases.
The text was updated successfully, but these errors were encountered:
A second thing I would like to do here is to clearly place the responsibility for scanning for entity classes back on the container. I think it's a mistake to place this responsibility on the persistence provider.
This can be easily solved by adding getAllManagedClassNames() to PersistenceUnitInfo.
Currently the Jakarta EE container can only get hold of the
ClassTransformer
for a persistence provider after the persistence unit has been started. The provider has to callPersistenceUnitInfo.addTransformer()
. This is a pretty weird design and results in chicken/egg dependencies for the container.But we can solve this problem by decoupling the lifecycle here, and adding a method
PersistenceProvider.createClassTransformer(PersistenceUnitInfo)
, allowing enhancement and bootstrap of the persistence unit to occur in two phases.The text was updated successfully, but these errors were encountered: