CreationalContext#incompleteInstance should get cleaned after create()
----------------------------------------------------------------------
Key: OWB-341
URL: https://issues.apache.org/jira/browse/OWB-341
Project: OpenWebBeans
Issue Type: Bug
Components: Context and Scopes
Affects Versions: M4
Reporter: Mark Struberg
Assignee: Mark Struberg
Fix For: 1.0.0
The incompleteInstance is only needed to prevent cyclic references IF no
proxying is used!
This means OWB doesn't technically need it at all!
This instance MUST NOT get used later! So using any CreationalContextImpl.get()
will most probably return a wrong instance!
This happens e.g in the following situation:
@SessionScoped
public class SessType() {
public int getX();
}
@ApplicationScoped
AppType {
@Inject SessType s;
}
In this scenario, accessing s from different sessions sometimes returns the
contextual SessType instance from the wrong session!
This happens since we currently hold the CreationalContext in the
NormalScopedBeanInterceptorHandler (which is another broken thing - a
normalScoped proxied bean MUST NOT propagate it's CreationalContext as
explained already) and return the wrong object in CreationalContextImpl#get().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.