Salut,
ThanhTran wrote:
> Hi guys,
>
> I tried as you comment, but, sometime with new connection, AttributeHolder
> still has instance and it's not null. I don't know why. Could you suggest a
> solution for that ?
Hum...looks like a bug. Do you have a test case/easy way to reproduce
the issue?
Thanks!
-- Jeanfrancois
>
> Thanks,
> Thanh Tran.
>
>
> Oleksiy Stashok wrote:
>> Ahoj :)
>> Inside your filter please do following:
>>
>> AttributeHolder connectionAttrs =
>>
>> ctx.getAttributeHolderByScope(AttributeScope.CONNECTION);
>> if (connectionAttrs == null) {
>> WorkerThread workerThread = (WorkerThread)
>> Thread.currentThread();
>> // Detach the current Thread data.
>> ThreadAttachment threadAttachment =
>> workerThread.getAttachment();
>> // Attach it to the SelectionKey so the it can be resumed
>> latter.
>> key.attach(threadAttachment);
>> connectionAttrs =
>> ctx.getAttributeHolderByScope(AttributeScope.CONNECTION);
>> }
>>
>> connectionAttrs.get/set
>>
>> Hope this will help.
>>
>> WBR,
>> Alexey.
>>
>>
>