activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1145577 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java
Date Tue, 12 Jul 2011 13:10:48 GMT
Author: dejanb
Date: Tue Jul 12 13:10:48 2011
New Revision: 1145577

URL: http://svn.apache.org/viewvc?rev=1145577&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-2583 - nio+ssl use thread pool for long tasks

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java?rev=1145577&r1=1145576&r2=1145577&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOSSLTransport.java
Tue Jul 12 13:10:48 2011
@@ -19,6 +19,7 @@ package org.apache.activemq.transport.ni
 
 import org.apache.activemq.command.Command;
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.thread.DefaultThreadPools;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.activemq.wireformat.WireFormat;
@@ -204,7 +205,6 @@ public class NIOSSLTransport extends NIO
         //TODO deal with BUFFER_OVERFLOW
 
         if (status == SSLEngineResult.Status.CLOSED) {
-            //TODO do shutdown
             sslEngine.closeInbound();
             return -1;
         }
@@ -223,10 +223,9 @@ public class NIOSSLTransport extends NIO
                     secureRead(ByteBuffer.allocate(sslSession.getApplicationBufferSize()));
                     break;
                 case NEED_TASK:
-                    //TODO use the pool
                     Runnable task;
                     while ((task = sslEngine.getDelegatedTask()) != null) {
-                        task.run();
+                        DefaultThreadPools.getDefaultTaskRunnerFactory().execute(task);
                     }
                     break;
                 case NEED_WRAP:



Mime
View raw message