admin@glassfish.java.net

Re: not enforcing uniqueness...

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 24 Mar 2008 14:26:30 -0700

The @Attribute.key() value is not being respected by the config API.
After modifying as below, I am still able to create more than one
property with the same name.

public interface Property extends ConfigBeanProxy, Injectable {

     /**
      * Gets the value of the name property.
      *
      * @return possible object is
      * {_at_link String }
      */
     @Attribute(required = true, key=true)
     public String getName();
...
}


On Mar 24, 2008, at 2:15 PM, Lloyd L Chambers wrote:
> I will find out, and test it.
>
> On Mar 24, 2008, at 11:06 AM, Kedar Mhaswade wrote:
>> Lloyd L Chambers wrote:
>>> Which "Key" would that be? Something to be written?
>>> MB2:hk2 lloyd$ find . -name "Key.java"
>>> MB2:hk2 lloyd$ cd3
>>> MB2:code lloyd$ find . -name "Key.java"
>>> MB2:code lloyd$
>>> On Mar 24, 2008, at 9:21 AM, Jerome Dochez wrote:
>>>> if we were to annotated name with @Key, I think it would do the
>>>> trick
>>
>> Is it the field key on annotation Attribute?
>>
>>>> but I need to check..
>>>>
>>>> jerome
>>>>
>>>> On Mar 21, 2008, at 4:51 PM, Lloyd L Chambers wrote:
>>>>
>>>>> Jerome,
>>>>>
>>>>> I am now able to create properties in AMX, but I'm seeing that
>>>>> they don't enforce any "unique id":
>>>>>
>>>>> <property value="bar" name="foo" />
>>>>> <property value="bar" name="foo" />
>>>>>
>>>>> Is this a general limitation that we need to deal with going
>>>>> forward?
>>>>>
>>>>> ---
>>>>> Lloyd L Chambers
>>>>> lloyd.chambers_at_sun.com
>>>>> Sun Microsystems, Inc
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>>
>>> ---
>>> Lloyd L Chambers
>>> lloyd.chambers_at_sun.com
>>> Sun Microsystems, Inc
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---
> Lloyd L Chambers
> lloyd.chambers_at_sun.com
> Sun Microsystems, Inc
>
>
>



---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc