-
Enhancement
-
Resolution: Unresolved
-
Minor
-
None
-
5.1.7.Final
-
None
-
JBoss Enterprise Application Platform
When an AOP Dependent Bean instance is got using jakarta.enterprise.inject.Instance#get(), why does CreationalContextImpl.dependentInstances continue to reference it?
I created a reproduction program.
Would you access the following git repository ?
https://github.com/jjugnsjeecditips202602/febtips04.git
And then , please build the web application and deploy febtips04-0.0.1-SNAPSHOT.war to JBoss EAP or WildFly.
```
mvn clean package
```
If you open the following URL in your browser and refresh it 20 times, you should experience an Out of Memory error.
```
http://localhost:8080/febtips04-0.0.1-SNAPSHOT/rest4/dpndnt
```
Runtime Info:
- Java SE 17
- Jakarta EE 10
- Jakarta CDI 4.0.1
- JBoss EAP 8.0.x
On the other hand, dependent bean instances that do not have AOP annotations declared are not referenced in CreationalContextImpl.dependences, so there is no need to pass them to CDI.current().destroy().
What are the reasons for this difference in behavior between main branch and feature/dependent-without-aop branch?