Yes, but for the ViewScoped Context, I cannot use our ContextFactory, because it is not a standard scope.
I need to go the route via the (almost) normal extension way. LieGrue, strub --- On Sun, 1/10/10, Gurkan Erdogdu <gurkanerdo...@yahoo.com> wrote: > From: Gurkan Erdogdu <gurkanerdo...@yahoo.com> > Subject: Re: Context.isActive() question and possible answer. > To: dev@openwebbeans.apache.org > Date: Sunday, January 10, 2010, 8:45 PM > Really do not understand what you > want to say! I do not know what is Weld session context is > about or not. > > In our case, session context are managed by the > SessionContextManager. Session scope instances are only > available while user session is active. Therefore, each > session context is activated on each request (meaning that > setting on thread local) and destroyed when session ends. > > Please also take ContextFactory class > > thks; > > --Gurkan > > > > > ________________________________ > From: Mark Struberg <strub...@yahoo.de> > To: dev@openwebbeans.apache.org > Sent: Sun, January 10, 2010 7:22:18 PM > Subject: Context.isActive() question and possible answer. > > 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 > > > > ___________________________________________________________________ > Yahoo! Türkiye açıldı! http://yahoo.com.tr > İnternet üzerindeki en iyi içeriği Yahoo! Türkiye > sizlere sunuyor!