[
https://issues.jboss.org/browse/WFLY-12446?page=com.atlassian.jira.plugin...
]
Matěj Novotný commented on WFLY-12446:
--------------------------------------
[~jaikiran] you are welcome, hope you have it running smoothly now.
Handling dynamic resolution with dependent instances can get rough indeed.
To confirm that this is expected flow, here is a spec quote, namely [5.6.1 The
{{Instance}}
interface|https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#dynamic_lookup]:
{quote}
The iterator() method must:
Identify the set of beans that have the required type and required qualifiers and are
eligible for injection into the class into which the parent Instance was injected,
according to the rules of typesafe resolution, as defined in Performing typesafe
resolution, resolving ambiguities according to Unsatisfied and ambiguous dependencies.
Return an Iterator, that iterates over the set of contextual references for the
resulting beans and required type, as defined in Contextual reference for a bean.
{quote}
And getting a contextual reference for a dependent bean means creating new instance every
time, hence the behaviour we are seeing in this issue.
Memory leak in StatelessSessionComponent
----------------------------------------
Key: WFLY-12446
URL:
https://issues.jboss.org/browse/WFLY-12446
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, EJB
Affects Versions: 17.0.1.Final
Reporter: Joerg Baesner
Assignee: Cheng Fang
Priority: Major
Attachments: dump-weld.png, playground-jee8.zip, server.log.gz,
wfly-12446-heap-dump.png
When running the attached reproducer application and doing a memory analysis afterwards,
it looks like a memory leak, e. g.
{code}
One instance of
"org.jboss.as.ejb3.component.stateless.StatelessSessionComponent" loaded by
"org.jboss.modules.ModuleClassLoader @ 0x5e0fbc2e0" occupies 936,593,520
(96.13%) bytes. The memory is accumulated in one instance of
"java.util.concurrent.ConcurrentLinkedQueue$Node" loaded by "<system
class loader>".
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)