You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "peter royal (JIRA)" <ji...@apache.org> on 2006/04/22 16:18:06 UTC

[jira] Commented: (DIRMINA-185) Refactor IoFilter life cycle management

    [ http://issues.apache.org/jira/browse/DIRMINA-185?page=comments#action_12375692 ] 

peter royal commented on DIRMINA-185:
-------------------------------------

Okay, would like to get some movement on this again.. How about:

init and destroy become start and stop (and remain on IoFilter interface)

IoFilterLCM goes away. Filters that want to start and stop whenever their reference count goes to 0 can use a wrapping filter that adds that behavior (MINA will provide), calling IoFilter.start/stop.

I think that encompasses what has been said in the comments..




> Refactor IoFilter life cycle management
> ---------------------------------------
>
>          Key: DIRMINA-185
>          URL: http://issues.apache.org/jira/browse/DIRMINA-185
>      Project: Directory MINA
>         Type: Improvement

>     Reporter: Niklas Therning
>     Priority: Minor

>
> I thought it would be good to have this discussion in JIRA. Please add your thoughs to this issue. Below I'll try to give a background to the problem.
> Recently, a discussion on IoFilter life cycle management has been going on on the MINA mailing list. Questions have been raised whether MINA should provide life cycle management (LCM) for all filters (the current situation), if it should be optional (either on by default or off by default) or if it shouldn't be supported at all.
> In version 0.9.2 of MINA IoFilter has six LCM methods:
> init, onPreAdd, onPostAdd, onPreRemove, onPostRemove and destroy
> The LCM is handled by AbstractIoFilterChain and the singleton IoFilterLifeCycleManager. IoFilterLifeCycleManager uses reference counting to determine whether init/destroy should be called when a filter is added to/removed from a filter chain. 
> In MINA 0.8 filter chains were typically shared among sessions. This meant that init/destroy would only be called once (or at least very few times) in the lifetime of an application. However, in MINA 0.9 filter chains are always per session which means that in some circumstances init/destroy will be called very frequently.
> The discussion on LCM forked from the discussion on DIRMINA-169. The LCM described above causes a deadlock in the current implementation of ThreadPoolFilter.
> How do you think MINA should handle LCM?

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