hi mark,

if you cache normal scope beans as well, please just cache the standard
scopes.
in special cases a cache for all normal scoped beans would cause
side-effects.

e.g. in case of an immediate destruction or reset of conversations provided
by myfaces codi.
the same might be true if you end the session manually.

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2010/7/23 Gerhard Petracek <[email protected]>

> hi mark,
>
> yes - i agree with you!
>
> ok - sounds great!
> i also planned to optimize it today.
> so i'll just have a look at your improvements.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2010/7/23 Mark Struberg <[email protected]>
>
>> Yes, what did confuse me first was the fact that half of the
>> bean.getScope().equals(Dependent.class) was coded in the ELResolver (the
>> 'get'
>> part), and half of it in ELContextStore (the 'put' part).
>>
>>
>> So the logic per se was just fine. I cleaned it up a bit, added
>> documentation
>> and also added a cache for name resolvements. This speeds up a typical JSF
>> application with lots of EL about 30% :)
>>
>> I hope it's a bit easier to read now. Please let me know if I forgot /
>> misinterpreted something.
>>
>> LieGrue,
>> strub
>>
>>
>>
>> ----- Original Message ----
>> > From: Gerhard Petracek <[email protected]>
>> > To: [email protected]
>> > Sent: Fri, July 23, 2010 10:43:48 AM
>> > Subject: Re: ELContextStore Question
>> >
>> > hi mark,
>> >
>> > as i see - the ELContextStore is just for dependent  beans.
>> > @NormalScoped beans aren't affected (see  ELContextStore#addDependent).
>> >
>> > regards,
>> > gerhard
>> >
>> > http://www.irian.at
>> >
>> > Your  JSF powerhouse -
>> > JSF Consulting, Development and
>> > Courses in English and  German
>> >
>> > Professional Support for Apache MyFaces
>> >
>> >
>> >
>> > 2010/7/23  Mark Struberg <[email protected]>
>> >
>> > >  Hi!
>> > >
>> > > I don't really understand the ELContextStore which is used  in the
>> > > WebBeansELResolver.
>> > >
>> > > It seems to cache all beans  which are invoked via EL. So far so good
>> (but
>> > > the
>> > > algorithm  needs improvement).
>> > > But what I absolutely not understand is why it  releases all those
>> beans at
>> > > the
>> > > end of each request. This leads  to invoking @PreDestroy to those
>> beans
>> > > after
>> > > every EL  encapsulation
>> > >
>> > >
>> > > My first bet is that this was an attempt  to resolve 6.4.3. Dependent
>> > > pseudo-scope and Unified EL,  isn't?
>> > >
>> > > This defines that in a complex EL statement, multiple  references to
>> the
>> > > same
>> > > @Dependent scoped bean must always get  the same Contextual instance
>> of this
>> > > very
>> > > bean. And for those  @Dependent scoped beans it is also ok to destroy
>> them,
>> > > because they  don't 'hang' on some NormalScoped bean.
>> > >
>> > > But we must not treat  @NormalScoped beans this very way!
>> > >
>> > > wdyt?
>> > >
>> > >  LieGrue,
>> > > strub
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>>
>>
>>
>>
>

Reply via email to