-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
---
-
---
Consider how to update the WildFly EE/Persistence Container for performing bytecode enhancement of entities in the most efficient way.
Jakarta EE 12 will include Persistence 4.0 which moves some of the bytecode enhancement requirements from the Persistence Provider to the EE container. The Persistence Provider will still perform the actual bytecode enhancement but the EE/Persistence container will drive it.
For this issue, when WildFly has internally constructed the PersistenceUnitInfo we should be able to find all Entity classes in the deployment and configure the needed classloader transformers to perform the enhancement. Then, we can load the entity classes.
Before actually trying ^, we should stop and review if/when we can actually load the entity classes which means we also need to ensure we don't break application datasources. Still, this likely would be the most optimal way to enhance entity classes without wasting cycles due to multiple threads trying to do the enhancement at the same time.
If we don't want to load the entity classes directly then we will see some inefficiency during deployment or runtime depending on when the entity classes are loaded. In the case that we settle with some inefficiency, we can consider other optimizations that would be less efficient but still better.
- depends on
-
WFLY-19694 Add prototype for the equivalent of having a PersistenceProvider.getClassTransformer() to allow entity enhancement and bootstrap of the persistence unit to occur in two phases
-
- Pull Request Sent
-
- is related to
-
WFLY-21260 Ensure that only one bytecode transformer is added for each Persistence Unit
-
- Resolved
-
-
WFLY-20393 Ensure that only one bytecode transformer is added for each Persistence Unit
-
- Closed
-