You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Haug Bürger (JIRA)" <ji...@apache.org> on 2009/10/28 11:07:59 UTC
[jira] Created: (DIRMINA-744) The filter order is broken for
sending
The filter order is broken for sending
--------------------------------------
Key: DIRMINA-744
URL: https://issues.apache.org/jira/browse/DIRMINA-744
Project: MINA
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0-RC1
Environment: Windows, Java 6
Reporter: Haug Bürger
The order in which the filters are called receiving messages is ok.
The order in which the send messages are processed is broken.
If the handler sends back a message via session.write("return"); the return message is not pushed through the filters in the reverse order.
I added a stripped down example which produces the following output.
StartStopPacketizer.doDecode
FilterOne messageReceived: Hello0.
FilterTwo messageReceived: Hello0.
MyHandler messageReceived: Hello0.
StartStopPacketizer.encode
FilterOne messageSent: return
FilterTwo messageSent: return
done
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DIRMINA-744) The filter order is broken for
sending
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRMINA-744.
---------------------------------------
Resolution: Invalid
The order the messageSent() event is processed is exactly the same than the order it is processed by the messageReceive() event. In fact, messageSent() is generated when the response *has been* written back to the client, and goes back through the chain up to the handler.
> The filter order is broken for sending
> --------------------------------------
>
> Key: DIRMINA-744
> URL: https://issues.apache.org/jira/browse/DIRMINA-744
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-RC1
> Environment: Windows, Java 6
> Reporter: Haug Bürger
> Attachments: test.zip
>
>
> The order in which the filters are called receiving messages is ok.
> The order in which the send messages are processed is broken.
> If the handler sends back a message via session.write("return"); the return message is not pushed through the filters in the reverse order.
> I added a stripped down example which produces the following output.
> StartStopPacketizer.doDecode
> FilterOne messageReceived: Hello0.
> FilterTwo messageReceived: Hello0.
> MyHandler messageReceived: Hello0.
> StartStopPacketizer.encode
> FilterOne messageSent: return
> FilterTwo messageSent: return
> done
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRMINA-744) The filter order is broken for
sending
Posted by "Haug Bürger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haug Bürger updated DIRMINA-744:
--------------------------------
Attachment: test.zip
Add the test package to a MINA project and run the test.Demo class. The demo contains a protocol, two filters and a handler. They print out the order they where called.
> The filter order is broken for sending
> --------------------------------------
>
> Key: DIRMINA-744
> URL: https://issues.apache.org/jira/browse/DIRMINA-744
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-RC1
> Environment: Windows, Java 6
> Reporter: Haug Bürger
> Attachments: test.zip
>
>
> The order in which the filters are called receiving messages is ok.
> The order in which the send messages are processed is broken.
> If the handler sends back a message via session.write("return"); the return message is not pushed through the filters in the reverse order.
> I added a stripped down example which produces the following output.
> StartStopPacketizer.doDecode
> FilterOne messageReceived: Hello0.
> FilterTwo messageReceived: Hello0.
> MyHandler messageReceived: Hello0.
> StartStopPacketizer.encode
> FilterOne messageSent: return
> FilterTwo messageSent: return
> done
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.