Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 1.1.3.SP1
-
Fix Version/s: 1.1.4.Final
-
Component/s: Scopes & Contexts
-
Labels:None
-
Environment:All
-
Steps to Reproduce:
Description
@PreDestroy method on @Dependend scope is invoked twice when we use Bean.destroy() method.
Problem occurs in destroy() method:
getInjectionTarget().preDestroy(instance);
creationalContext.release();
The initial issue I see is that CreationalContextImpl passes dependentInstances as a ref to its child – from getCreationalContext.
This ref gets then later filled from addDependentInstance invocation on new creational context instance.
@Pete: the question is (and imo it looks like it is), is this intentional – passing the ref instead of deep copy?