cache resolved instances in NormalScopedBeanMethodHandlers of @SessionScoped
beans
----------------------------------------------------------------------------------
Key: OWB-315
URL: https://issues.apache.org/jira/browse/OWB-315
Project: OpenWebBeans
Issue Type: Improvement
Affects Versions: M4
Reporter: Mark Struberg
Assignee: Mark Struberg
Fix For: 1.0.0
contextual instances of a @SessionScoped bean may get cached as long as the
context refers to the same sessionId as:
private ThreadLocal<WeakReference<?>> instanceCache;
If the sessionId changes (for the current thread), then we need to refresh the
cache
Usecase:
public @SessionScoped class UserSettings {
private Locale locale;
...
}
public @ApplicationScoped class MyService {
private @Inject UserSettings us;
...
}
In this case the contextual reference (proxy) which gets injected in variable
'us' doesn't need to reload the contextual instance from the central context,
but only if the sessionId of the current thread changes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.