Hi!
Gurkan, I think I know why JBoss guys really need the isActive() and we do not.
It seems that Weld Contexts are more like our ContextManagers (e.g. Welds
SessionContext <-> our SessionContextManager.
So Weld has only one SessionContext in the container and we have n (1 for each
new Session). This doesn't make much difference for the users but it's
important to understand the internal differences.
This observation is backed by the fact that registering new Contexts via the
AfterBeanDiscoveryEvent only allows to addContext(Context
theOneAndOnlyContextForYourScope);
The isActive takes care that beans are not referenced outside of the defined
lifecycle. E.g. a SessionContext should be set to active=false once we return
the http response and should get reactivated on the next request. This is easy
if you have one SessionContext (as Weld has) but in our case, we should store
this fact in the SessionContextManager and have all our SessionContexts simply
return the SessionContextManager.getInstance().isActive();
does this make sense? :)
LieGrue,
strub