Hi Alexey,
I fixed it.
Thanks!
Regards,
Bongjae Chang
On 1/17/12 7:27 PM, "Oleksiy Stashok" <oleksiy.stashok_at_oracle.com> wrote:
>Hi Bongjae,
>
>good catch!
>
>These 2 default builders should be the same.
>Can you pls. file issue and fix it? :)
>
>Thanks.
>
>WBR,
>Alexey.
>
>
>On 01/17/2012 09:54 AM, Bongjae Chang wrote:
>> Hi,
>>
>> When I set an attribute to NIOConnection, I had a problem.
>>
>> Here is example.
>>
>> When a connection established, I tried to attach an attribute to the
>> connection like this.
>> ---
>> future = connectorHandler.connect(Š);
>> connection = future.get();
>> AttributeHolder attributeHolder = Connection.getAttributes();
>> attributeHolder.setAttribute("first", "sample1"); -----(1)
>> ---
>>
>> In my filter class, another attribute was defined like this.
>> ---
>> private final Attribute anotherAttribute =
>> Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute("another");
>> ---
>>
>> When I called the "anotherAttribute.get(connection)" first, the first
>> attribute(1) returned.
>>
>> When I reviewed sources about attributes, I found NIOConnection didn't
>> have Grizzly.DEFAULT_ATTRIBUTE_BUILDER but
>> AttributeBuilder.DEFAULT_ATTRIBUTE_BUILDER.
>> So, attributes could get twisted in the same NIOConnection.
>>
>> I would like to know if I used a wrong way for setting attribute
>> associated with connection.
>>
>> Thanks.
>>
>> Regards,
>> Bongjae Chang
>