Thank you for your answer. Just one last question about the topic of threadpools in this context.

Can I add the snippet:

<bean class="org.apache.mina.filter.thread.ThreadPoolFilter">
  <constructor-arg>
    <bean class="org.apache.mina.filter.thread.LeaderFollowersThreadPool">
      <property name="threadNamePrefix" value="IoWorker"/>
      <property name="maximumPoolSize" value="16"/>
      <property name="keepAliveTime" value="60000"/>
    </bean>
  </constructor-arg>
</bean>

once at the beginning of the filterchain filters list and once more at the end to encapsulate more timeconsuming tasks in some of the codecs between them?

And last but not least: I didn't understand fully the extended threadmodel. What happens, when I use your second approach?

An alternative to the changes above would be to configure your own
PooledThreadModel and remove the ThreadPoolFilter configuration:

<bean class="org.apache.mina.transport.socket.nio.SocketAcceptorConfig">
  <property name="reuseAddress" value="true"/>
  <property name="threadModel">
    <bean class="org.apache.mina.common.PooledThreadModel">
      <property name="threadNamePrefix" value="IoWorker"/>
      <property name="maximumPoolSize" value="16"/>
      <property name="keepAliveTime" value="60000"/>
    </bean>
  </property>
</bean>

Is the result already a full functionally threadpool (and if, of what kind it is) or must I add some additional code here (e.g. when I want to use another threadmodel instead)?
I hope you know what I mean :)

Best Regards
Michael

Reply via email to