You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would I go about binding singleton instances to last scope and not to the scope where they were installed?
My motivation for such approach is performance. Suppose there are a lot of bindings in RequestScope that need to be installed (say thousands), but very few of them are ever used. It would be very expensive to install those bindings on every request when they are not needed. If I could just install them once but instantiate them in subscope that would be great!
So I'd like to resolve those few instances and cache them during request in MyScope. However, current behavior is that RequestScope caches them and I am stuck. I tried playing with supportScopeAnnotations without luck.
The text was updated successfully, but these errors were encountered:
Suppose I am building a Web server. I tried to organize my scopes as such:
AppScope -> SessionScope -> RequestScope -> MyScope
How would I go about binding singleton instances to last scope and not to the scope where they were installed?
My motivation for such approach is performance. Suppose there are a lot of bindings in RequestScope that need to be installed (say thousands), but very few of them are ever used. It would be very expensive to install those bindings on every request when they are not needed. If I could just install them once but instantiate them in subscope that would be great!
So I'd like to resolve those few instances and cache them during request in MyScope. However, current behavior is that RequestScope caches them and I am stuck. I tried playing with supportScopeAnnotations without luck.
The text was updated successfully, but these errors were encountered: