You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "chenliangde (JIRA)" <ji...@apache.org> on 2008/01/22 08:16:35 UTC
[jira] Created: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Provide IoHandler.sessionCreating() method
------------------------------------------
Key: DIRMINA-516
URL: https://issues.apache.org/jira/browse/DIRMINA-516
Project: MINA
Issue Type: Improvement
Components: Core
Environment: All
Reporter: chenliangde
is better IoHandler provides a sessionCreating Method, reasons:
1. to take care the things have to be done before session created.
Some times messageReceived() is called before sessionCreated() returned.
2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
the server can prevent the session creation to save resource.
Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Posted by "Mark Webb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561440#action_12561440 ]
Mark Webb commented on DIRMINA-516:
-----------------------------------
Why not write a variant of the BlacklistFilter? This should stop the session creation and data reading in time.
http://mina.apache.org/report/trunk/xref/org/apache/mina/filter/firewall/BlacklistFilter.html
> Provide IoHandler.sessionCreating() method
> ------------------------------------------
>
> Key: DIRMINA-516
> URL: https://issues.apache.org/jira/browse/DIRMINA-516
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Environment: All
> Reporter: chenliangde
>
> is better IoHandler provides a sessionCreating Method, reasons:
> 1. to take care the things have to be done before session created.
> Some times messageReceived() is called before sessionCreated() returned.
> 2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
> the server can prevent the session creation to save resource.
>
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Posted by "Mark Webb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561410#action_12561410 ]
Mark Webb commented on DIRMINA-516:
-----------------------------------
I have a few comments...
1. What logic would go into the sessionCreating() method that would ensure that it completes before sessionCreated() or messageReceived()? I guess whatever logic you are looking to put into the sessionCreated() method would go into your own IoHandler's sessionCreated() method.
2. There are filters that can help you with this problem already. If you cannot find the exact filter, writing a new one is very easy.
..my 2 cents
Mark
> Provide IoHandler.sessionCreating() method
> ------------------------------------------
>
> Key: DIRMINA-516
> URL: https://issues.apache.org/jira/browse/DIRMINA-516
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Environment: All
> Reporter: chenliangde
>
> is better IoHandler provides a sessionCreating Method, reasons:
> 1. to take care the things have to be done before session created.
> Some times messageReceived() is called before sessionCreated() returned.
> 2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
> the server can prevent the session creation to save resource.
>
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Posted by "chenliangde (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561427#action_12561427 ]
chenliangde commented on DIRMINA-516:
-------------------------------------
Hi Mark,
I would like to do some initializing things in the sessionCreating() method, so that it would be sure that the messageReceived() will not be called before the initializing.
sessionCreated() can not make it sure.
Besides that, I have one more scenario:
I am using ssl filer to support ssl connection.
I have a connection count limitation filter, it is placed before the ssl filter.
Once the limitation is reached, the new session will be closed in the IoFilter.sessionCreated().
But at that time the session has been created and then closed, the SSL handshake is started, and for earch
of the connection, it takes at least 64k ByteBuffer. It is a very heavy cost for a not actually working session.
So, my server crash under a heavy load test..
I had to modify the SocketAcceper to prevent the session creation. I really don't like to modify it, even though the modification is working fine.
Regards & Thanks
Chen
> Provide IoHandler.sessionCreating() method
> ------------------------------------------
>
> Key: DIRMINA-516
> URL: https://issues.apache.org/jira/browse/DIRMINA-516
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Environment: All
> Reporter: chenliangde
>
> is better IoHandler provides a sessionCreating Method, reasons:
> 1. to take care the things have to be done before session created.
> Some times messageReceived() is called before sessionCreated() returned.
> 2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
> the server can prevent the session creation to save resource.
>
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Posted by "chenliangde (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561583#action_12561583 ]
chenliangde commented on DIRMINA-516:
-------------------------------------
Sorry, I was wrong, the sessionCreated() is what I need.
> Provide IoHandler.sessionCreating() method
> ------------------------------------------
>
> Key: DIRMINA-516
> URL: https://issues.apache.org/jira/browse/DIRMINA-516
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Environment: All
> Reporter: chenliangde
>
> is better IoHandler provides a sessionCreating Method, reasons:
> 1. to take care the things have to be done before session created.
> Some times messageReceived() is called before sessionCreated() returned.
> 2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
> the server can prevent the session creation to save resource.
>
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DIRMINA-516) Provide IoHandler.sessionCreating()
method
Posted by "chenliangde (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chenliangde closed DIRMINA-516.
-------------------------------
Resolution: Invalid
sessionCreated() is what I need.
> Provide IoHandler.sessionCreating() method
> ------------------------------------------
>
> Key: DIRMINA-516
> URL: https://issues.apache.org/jira/browse/DIRMINA-516
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Environment: All
> Reporter: chenliangde
>
> is better IoHandler provides a sessionCreating Method, reasons:
> 1. to take care the things have to be done before session created.
> Some times messageReceived() is called before sessionCreated() returned.
> 2. To stop session creation. If the connection count limitation is reached , or the connection comes from blocked IP,
> the server can prevent the session creation to save resource.
>
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.