[webbeans-dev] MetaDataCache

Pete Muir pmuir at redhat.com
Sun Dec 7 06:20:21 EST 2008


On 6 Dec 2008, at 18:50, Gavin King wrote:

> I think MetaDataCache is probably a different case, but I agree on  
> ManagerImpl.

I agree, we can make it a static singleton as this is state which has  
no conceivable reason for changing.

> I think we got our wires slightly crossed earlier - when I said that
> Manager could be made a static thing,

Yes, I was slightly confused by you saying it should be a static  
singleton as that didn't seem to be way the spec was designed - thanks  
for fixing it.

> I was meaning for *integration*
> purposes only! i.e. the Manager used for EL resolution and injection
> into Servlets would be a static thing.
>
>
> There are definitely multiple managers per application, now that we
> have child managers.
>
> And I agree that the internal usage of the static reference makes shit
> more difficult to test.
>
> On Fri, Dec 5, 2008 at 8:49 PM, Matt Drees <matt.drees at gmail.com>  
> wrote:
>> I'll speak up about one concern I have.  If MetaDataCache and  
>> ManagerImpl
>> are stored in static references, I imagine it will be difficult to  
>> perform
>> simultaneous/multi-threaded integration testing for webbeans apps.   
>> For
>> example, with Seam, you can't have two SeamTests running at the  
>> same time in
>> the same JVM, because Lifecycle.java has a static reference to the
>> application map, and the two tests would interfere with each  
>> other.  I'd be
>> sad if the same thing occurs for the webbeans ri.
>>
>> Now, maybe you could could use some ThreadLocal magic or something  
>> to avoid
>> having to pass the ManagerImpl/metadatacache around everywhere in  
>> method
>> calls. But my preference would be that the webbeans RI doesn't use  
>> static
>> singletons at all.
>>
>> What do you guys think?
>>
>> -Matt
>>
>>
>> On Fri, Dec 5, 2008 at 5:04 PM, Gavin King <gavin at hibernate.org>  
>> wrote:
>>>
>>> Is there any reason why we can't just make the MetaDataCache  
>>> object a
>>> static singleton?
>>>
>>> --
>>> Gavin King
>>> gavin.king at gmail.com
>>> http://in.relation.to/Bloggers/Gavin
>>> http://hibernate.org
>>> http://seamframework.org
>>> _______________________________________________
>>> webbeans-dev mailing list
>>> webbeans-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>>
>>
>> _______________________________________________
>> webbeans-dev mailing list
>> webbeans-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>>
>>
>
>
>
> -- 
> Gavin King
> gavin.king at gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev




More information about the weld-dev mailing list