[
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.