dev@grizzly.java.net

Re: Orderly Shutdown of Server in ProtocalParser code

From: Parker Lord <plord_at_seecontrol.com>
Date: Thu, 2 Jul 2009 11:52:21 -0700 (PDT)

This is the same as what I am doing, however, in my case the default protocol
chain has a ProtocolParser in its filter chain and is getting invoked event
when i send a message to the tcpHandler on the admin port. The parser does
not find a complete message and does not continue on to the filter.

To clarify I have two tcpHandlers
1) Listens on any IP address and port 50100
    Has a ProtocolParser and Message Filter in the chain
2) listens on 127.0.0.1 and port 50101
    has ReadFilter() and an admin message filter in the chain.

When I send a message to 127.0.0.1 on port 50101, I would expect tcpHandler
2 to handle it and call my filter chain defined there, which is the read
filter followed by my admin message filter. However the ProtocolParser in
tcpHandler 1 is getting called.
http://www.nabble.com/file/p24312166/Sample.zip Sample.zip
I have attached my sample code.

Server is SampleMain
Admin Client which sends on port 50101 is SampleAdminClient.
Normal Client which sends on port 50100 is ClientSampleMain.




Oleksiy Stashok wrote:
>
> Hi,
>
> here I've created simple example, which creates 3 TCPSelectorHandlers,
> which uses 3 different ProtocolChains.
> Two TCPSelectorHandler have own ProtocolChains set, and one uses
> default Controller ProtocolChain.
>
> This example works for me.
>
> Please let me know, if this works for you, or you meant some different
> scenario.
>
> Thanks.
>
> WBR,
> Alexey.
>
>
>
>
> On Jul 1, 2009, at 18:59 , Parker Lord wrote:
>
>>
>> Just tried the same test with the 1.9.17-SNAPSHOT jar and no change.
>> The process does not exit and I cannot get two ProtocolHandlers to
>> respond
>> at the same time.
>>
>> I can see the sockets in LISTEN mode on the correct port and IP
>> Addresses,
>> but the Filters never get invoked. Only when I add the ProtocolHandler
>> directly to the connector does it respond.
>> I assume I cant add two handlers this way.
>>
>> e.g. -> controller.setProtocolChainInstanceHandler(pciAdminHandler);
>>
>>
>> Oleksiy Stashok wrote:
>>>
>>> Hi,
>>>
>>> can I ask you to repeat tests with 1.9.17-SNAPSHOT, just to be sure
>>> the issues are still there?
>>>
>>> Thank you.
>>>
>>> WBR,
>>> Alexey.
>>>
>>>>
>>>> Stuff deleted.....
>>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Orderly-Shutdown-of-Server-in-ProtocalParser-code-tp24081691p24293437.html
>> Sent from the Grizzly - Development mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>

-- 
View this message in context: http://www.nabble.com/Orderly-Shutdown-of-Server-in-ProtocalParser-code-tp24081691p24312166.html
Sent from the Grizzly - Development mailing list archive at Nabble.com.