persistence icon indicating copy to clipboard operation
persistence copied to clipboard

add PersistenceProvider.getClassTransformer()

Open gavinking opened this issue 1 year ago • 2 comments

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.

gavinking avatar Aug 30 '24 19:08 gavinking