Hi
On Wed, Sep 24, 2014 at 10:20 PM, manfred riem <manfred.riem_at_oracle.com>
wrote:
>
> since the other bean types can live longer than a request what does it
> mean to have a reference to a FacesContext? Or phrased a bit differently
> what would a FacesContext be used for outside the scope of a request?
Well, it's not about using a FacesContext outside the scope of a request,
it's about delegating each time to the one corresponding to the current
request (and throwing an exception if there is no current request). This
happens automatically in CDI when a proxy is injected (as happens for
normal scoped beans).
Without such proxy, CDI would inject a direct reference once and only once.
With a proxy, CDI will transparently lookup the right actual reference with
each call.
So how did Seam solve the above problem?
>
I'm curious to find out as well. My guess is simply a request scoped bean
that implements ServletRequest and delegates to the actual ServletRequest
instance.
Kind regards,
Arjan