[webbeans-dev] Re: suggestion for Web Beans regarding @Named

Gavin King gavin at hibernate.org
Fri Nov 7 01:42:37 EST 2008


Send the suggestion to the web beans EG.

On Fri, Nov 7, 2008 at 1:00 AM, Dan Allen <dan.j.allen at gmail.com> wrote:
> On Fri, Nov 7, 2008 at 12:37 AM, Gavin King <gavin at hibernate.org> wrote:
>> That's really not a bad idea.
>
> whoohoo!
>
>>
>> On Fri, Nov 7, 2008 at 12:26 AM, Dan Allen <dan.j.allen at gmail.com> wrote:
>>> You could put the @Named annotation on package-info.java to have it
>>> apply to an entire package. In that case, you could go one of two
>>> directions. You could either say that a @Named on package-info.java
>>> enables qualified names for uses of @Named in that package OR you
>>> could say that it just acts as a setting, in which case you would
>>> still need @Named(qualified = true). Personally, I like the first way.
>>>
>>> -Dan
>>>
>>> On Fri, Nov 7, 2008 at 12:13 AM, Gavin King <gavin at hibernate.org> wrote:
>>>> Perhaps a better idea is some archive-level setting to change the behavior
>>>> of @Named. Not sure...
>>>>
>>>> On Fri, Nov 7, 2008 at 12:11 AM, Gavin King <gavin at hibernate.org> wrote:
>>>>> Yeah, I hate it, but it probably does make sense.
>>>>>
>>>>> Send the proposal to the web beans group, I suppose.
>>>>>
>>>>> On Fri, Nov 7, 2008 at 12:05 AM, Dan Allen <dan.j.allen at gmail.com> wrote:
>>>>>> Gavin,
>>>>>>
>>>>>> I have a suggestion for Web Beans regarding the convention used by the
>>>>>> @Named annotation. The nice part about this annotation is that it
>>>>>> doesn't require the use of a string value to create a name that maps
>>>>>> to the class name. In ~80% of cases, that is what people would do
>>>>>> anyway. However, for framework builders, I can see them wanting to
>>>>>> create fully-qualified names like in Seam to avoid naming conflicts.
>>>>>> Would it be reasonable to propose adding an attribute to the @Named
>>>>>> annotation that indicates the Java package should be prepended to the
>>>>>> calculated name?
>>>>>>
>>>>>> @Named(qualified = true)
>>>>>>
>>>>>> That would avoid people slipping into the non-type safe pattern of:
>>>>>>
>>>>>> @Named("org.jboss.seam.core.expressions")
>>>>>>
>>>>>> -Dan
>>>>>>
>>>>>> --
>>>>>> Dan Allen
>>>>>> Software consultant | Author of Seam in Action
>>>>>>
>>>>>> http://mojavelinux.com
>>>>>> http://mojavelinux.com/seaminaction
>>>>>>
>>>>>> NOTE: While I make a strong effort to keep up with my email on a daily
>>>>>> basis, personal or other work matters can sometimes keep me away
>>>>>> from my email. If you contact me, but don't hear back for more than a week,
>>>>>> it is very likely that I am excessively backlogged or the message was
>>>>>> caught in the spam filters.  Please don't hesitate to resend a message if
>>>>>> you feel that it did not reach my attention.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Gavin King
>>>>> gavin.king at gmail.com
>>>>> http://in.relation.to/Bloggers/Gavin
>>>>> http://hibernate.org
>>>>> http://seamframework.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Gavin King
>>>> gavin.king at gmail.com
>>>> http://in.relation.to/Bloggers/Gavin
>>>> http://hibernate.org
>>>> http://seamframework.org
>>>>
>>>
>>>
>>>
>>> --
>>> Dan Allen
>>> Software consultant | Author of Seam in Action
>>>
>>> http://mojavelinux.com
>>> http://mojavelinux.com/seaminaction
>>>
>>> NOTE: While I make a strong effort to keep up with my email on a daily
>>> basis, personal or other work matters can sometimes keep me away
>>> from my email. If you contact me, but don't hear back for more than a week,
>>> it is very likely that I am excessively backlogged or the message was
>>> caught in the spam filters.  Please don't hesitate to resend a message if
>>> you feel that it did not reach my attention.
>>> _______________________________________________
>>> 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
>>
>
>
>
> --
> Dan Allen
> Software consultant | Author of Seam in Action
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
> NOTE: While I make a strong effort to keep up with my email on a daily
> basis, personal or other work matters can sometimes keep me away
> from my email. If you contact me, but don't hear back for more than a week,
> it is very likely that I am excessively backlogged or the message was
> caught in the spam filters.  Please don't hesitate to resend a message if
> you feel that it did not reach my attention.
> _______________________________________________
> 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



More information about the weld-dev mailing list