[ http://issues.apache.org/jira/browse/DIRMINA-162?page=all ]
Greg Duffy updated DIRMINA-162:
-------------------------------
Attachment: mina-datagram-session-management-v4.diff
I just refactored my work based on the latest revision.
Firstly, I used the backport concurrent classes to achieve thread safety in the
ExpiringMap.
Also, I had the idea to model ExpiringSessionRecycler after
ExecutorThreadModel, and have ExpiringSessionRecyclers associated to services.
Next, I created IoSessionRecycler.NOOP (doesn't ever recycle a session), which
is set to be the default IoSessionRecycler implementation since I don't think
we can assume that people want session recycling on by default. It also saves
them a thread if they don't, since otherwise one would be created for the
Expirer no matter what (since ExpiringSessionRecycler was default
implementation).
Lastly, I made the Expirer thread a daemon thread to prevent holding up a
shutdown process.
so if you want recycling, do something like:
ExpiringSessionRecycler recycler =
ExpiringSessionRecycler.getInstance("serviceName");
recycler.startExpiring();
serviceConfig.setSessionRecycler(recycler);
Let me know what you think!
> datagram session management fails
> ---------------------------------
>
> Key: DIRMINA-162
> URL: http://issues.apache.org/jira/browse/DIRMINA-162
> Project: Directory MINA
> Issue Type: Bug
> Affects Versions: 0.9
> Reporter: Rainer Bieniek
> Assigned To: Trustin Lee
> Priority: Minor
> Fix For: 1.0
>
> Attachments: mina-datagram-session-management-v2.diff,
> mina-datagram-session-management-v3.diff,
> mina-datagram-session-management-v4.diff,
> mina-datagram-session-management.diff
>
>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not
> cache created session but only assign the select key to the session and drops
> it after processing the package. It would be better to attach the session to
> the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram
> session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira