directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r178107 - /directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java
Date Tue, 24 May 2005 06:38:46 GMT
Author: elecharny
Date: Mon May 23 23:38:46 2005
New Revision: 178107

URL: http://svn.apache.org/viewcvs?rev=178107&view=rev
Log:
Suppressed the pooling mechanism

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java?rev=178107&r1=178106&r2=178107&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/perfs/org/apache/ans1/ber/LdapDecoderPerf.java
Mon May 23 23:38:46 2005
@@ -21,11 +21,9 @@
 import org.apache.asn1.ber.containers.IAsn1Container;
 import org.apache.asn1.ldap.codec.LdapDecoder;
 import org.apache.asn1.ldap.codec.LdapMessageContainer;
-import org.apache.asn1.ldap.codec.LdapPoolEnum;
 import org.apache.asn1.ldap.pojo.BindRequestPOJO;
 import org.apache.asn1.ldap.pojo.LdapMessagePOJO;
 import org.apache.asn1.ldap.pojo.SimpleAuthenticationPOJO;
-import org.apache.asn1.util.pools.PoolException;
 
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
@@ -88,27 +86,12 @@
                 //log.debug( "---------------------> " + i );
 
                 // Allocate a BindRequest Container
-                IAsn1Container ldapMessageContainer = null;
-
-                try
-                {
-                    ldapMessageContainer = ( IAsn1Container ) ldapDecoder.allocate(
-                            LdapPoolEnum.LDAP_MESSAGE_CONTAINER_POOL );
-                }
-                catch ( PoolException pe )
-                {
-                    log.error( "Cannot allocat a LdapMessageContainer : " + pe.getMessage()
);
-
-                    return;
-                }
-
-                ldapMessageContainer.setPoolManager( ldapDecoder.getPoolManager() );
+                IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
                 ldapDecoder.decode( stream, ldapMessageContainer );
 
                 // Free the BindRequest Container. It will be put back in the IPool
                 // after being reset.
-                ldapMessageContainer.free();
                 stream.flip();
             }
 
@@ -125,9 +108,7 @@
         try
         {
 
-            IAsn1Container ldapMessageContainer = ( IAsn1Container ) ldapDecoder.allocate(
-                    LdapPoolEnum.LDAP_MESSAGE_CONTAINER_POOL );
-            ldapMessageContainer.setPoolManager( ldapDecoder.getPoolManager() );
+            IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
             ldapDecoder.decode( stream, ldapMessageContainer );
 
@@ -146,19 +127,11 @@
                 ( ( br.getAuthentication() instanceof SimpleAuthenticationPOJO ) ? "Simple"
: "sasl" ) );
             System.out.println( "	simple		= " +
                 ( ( SimpleAuthenticationPOJO ) br.getAuthentication() ).getSimple() );
-
-            ldapMessageContainer.free();
         }
         catch ( DecoderException de )
         {
             log.error( de.getMessage() );
             de.printStackTrace();
-        }
-        catch ( PoolException pe )
-        {
-            log.error( "Cannot allocat a BindRequestContainer : " + pe.getMessage() );
-
-            return;
         }
     }
 



Mime
View raw message