Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A875D7CE for ; Thu, 4 Oct 2012 09:27:12 +0000 (UTC) Received: (qmail 14307 invoked by uid 500); 4 Oct 2012 09:27:12 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 14152 invoked by uid 500); 4 Oct 2012 09:27:10 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 14018 invoked by uid 99); 4 Oct 2012 09:27:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 09:27:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 09:27:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 360B6238890D for ; Thu, 4 Oct 2012 09:26:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1393968 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Date: Thu, 04 Oct 2012 09:26:24 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121004092624.360B6238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Thu Oct 4 09:26:23 2012 New Revision: 1393968 URL: http://svn.apache.org/viewvc?rev=1393968&view=rev Log: Using only one IoProcessor for the connector. We don't need more. Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1393968&r1=1393967&r2=1393968&view=diff ============================================================================== --- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original) +++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Thu Oct 4 09:26:23 2012 @@ -355,7 +355,7 @@ public class LdapNetworkConnection exten { super(); this.config = config; - + if ( config.getBinaryAttributeDetector() == null ) { config.setBinaryAttributeDetector( new DefaultConfigurableBinaryAttributeDetector() ); @@ -498,7 +498,8 @@ public class LdapNetworkConnection exten // Create the connector if needed if ( connector == null ) { - connector = new NioSocketConnector(); + // Use only one thead inside the connector + connector = new NioSocketConnector( 1 ); // Add the codec to the chain connector.getFilterChain().addLast( "ldapCodec", ldapProtocolFilter ); @@ -641,8 +642,9 @@ public class LdapNetworkConnection exten // Store the container into the session if we don't have one LdapMessageContainer> container = - (LdapMessageContainer>)ldapSession.getAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR ); - + ( LdapMessageContainer> ) ldapSession + .getAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR ); + if ( container == null ) { ldapSession.setAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR, @@ -1134,6 +1136,8 @@ public class LdapNetworkConnection exten { return createBindRequest( name.getName(), credentials, null, ( Control[] ) null ); } + + /** * {@inheritDoc} */ @@ -3231,6 +3235,8 @@ public class LdapNetworkConnection exten { loadSchema( new DefaultSchemaLoader( this ) ); } + + /** * loads schema using the specified schema loader * @@ -3253,7 +3259,7 @@ public class LdapNetworkConnection exten } schemaManager = tmp; - + // Change the container's BinaryDetector ldapSession.setAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR, new LdapMessageContainer>( codec,