[webbeans-dev] Fwd: static producers

Pete Muir pmuir at redhat.com
Wed Dec 3 06:33:56 EST 2008


On 14 Nov 2008, at 17:50, Gavin King wrote:

> ---------- Forwarded message ----------
> From: Gavin King <gavin at hibernate.org>
> Date: Fri, Nov 14, 2008 at 12:50 PM
> Subject: static producers
> To: Java Community Process JSR #299 Expert List <JSR-299-EG at jcp.org>
>
>
> Question:
>
> should we allow producer methods and fields to be declared "static"?

Definitely.

>
>
> This would mean that the Web Bean manager does not need to instantiate
> an instance of the Web Bean that declares the producer method/field
> when invoking the method/field.
>
> I can't think of a good reason why *not*...
>
> Furthermore, should we allow static observer and disposal methods?
> Again, I can't quite think of a reason why *not*...

Disposal methods, yes to match producer methods. Static observer  
methods are less interesting I think.




More information about the weld-dev mailing list