[webbeans-dev] Re: CreationalContext

Scott Ferguson ferg at caucho.com
Mon Jan 12 10:11:18 EST 2009


On Jan 12, 2009, at 5:24 AM, Gavin King wrote:

> On Sat, Jan 10, 2009 at 2:34 AM, Scott Ferguson <ferg at caucho.com>  
> wrote:
>
>> Requiring proxies for all beans is a performance hit which is  
>> entirely
>> unnecessary with the proper SPI.
>>
>> If the tradeoff is a performance hit on every method call (proxy)  
>> for every
>> bean, vs a slight added complexity in the _SPI_, i.e. an interface  
>> that 98%
>> of developers _never even see_, it should be obvious that the SPI  
>> change is
>> the right one.
>>
>>> I guess I can that it might be useful for pseudo-scopes other than
>>> @Dependent, or possibly as a performance optimization...
>>
>> It's not an "optimization", it's the basic overhead of the basic  
>> method
>> call.
>
> OK, but you as the implementer of the Manager and of the most
> important implementations of the Bean interface (for simple beans,
> producer methods and session beans) can easily provide your own
> internal SPI with *your* implementations of Bean, and *your*
> implementation of Manager support. Is it *really* important that this
> be provided for third-party implementations of Bean?

Well, that's what I'm doing now, but isn't that circumventing the spec?

On the other hand, my major concern was that I'd support circular  
references and no one else would, which would be a problem.  If  
everyone supports the same visible behavior, and I'm not forced to use  
a proxy by the spec, (and others use proxies because it's easier to  
implement) then I guess it's less important.

Unless the 3rd party Bean implementations become important, and then  
they're stuck.

> Really, I'm just asking the question. I'm not against adding this at
> all, I'm just trying to balance the additional spec complexity
> involved.

Right, but my point before was that different parts of the spec can  
handle extra complexity.  Anything a normal user sees needs to be as  
simple as possible.  The SPI can handle some extra complexity, because  
the rare Bean developers are more capable.

-- Scott

>
>
> -- 
> Gavin King
> gavin.king at gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
>
>




More information about the weld-dev mailing list