mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject Re: svn commit: r1151842 - /mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java
Date Thu, 28 Jul 2011 14:16:52 GMT
-1,  2.0.4  was already released :D

I didn't created 2.0.5 branch when I released 2.0.4 that's probably
the source of confusion.

Juilen

On Thu, Jul 28, 2011 at 3:45 PM,  <elecharny@apache.org> wrote:
> Author: elecharny
> Date: Thu Jul 28 13:45:43 2011
> New Revision: 1151842
>
> URL: http://svn.apache.org/viewvc?rev=1151842&view=rev
> Log:
> added a ExecutionRejectionHandler in the NioProcessor executor if the default constructor,
to prevent the thread pool exhaustion
>
> Modified:
>    mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java
>
> Modified: mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java
> URL: http://svn.apache.org/viewvc/mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java?rev=1151842&r1=1151841&r2=1151842&view=diff
> ==============================================================================
> --- mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java
(original)
> +++ mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/SimpleIoProcessorPool.java
Thu Jul 28 13:45:43 2011
> @@ -24,6 +24,7 @@ import java.util.Arrays;
>  import java.util.concurrent.Executor;
>  import java.util.concurrent.ExecutorService;
>  import java.util.concurrent.Executors;
> +import java.util.concurrent.ThreadPoolExecutor;
>
>  import org.apache.mina.core.RuntimeIoException;
>  import org.apache.mina.core.session.AbstractIoSession;
> @@ -157,6 +158,8 @@ public class SimpleIoProcessorPool<S ext
>
>         if (createdExecutor) {
>             this.executor = Executors.newCachedThreadPool();
> +            // Set a default reject handler
> +            ((ThreadPoolExecutor)this.executor).setRejectedExecutionHandler( new
ThreadPoolExecutor.CallerRunsPolicy() );
>         } else {
>             this.executor = executor;
>         }
>
>
>

Mime
View raw message