directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r157383 - directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Date Mon, 14 Mar 2005 04:47:25 GMT
Author: trustin
Date: Sun Mar 13 20:47:24 2005
New Revision: 157383

URL: http://svn.apache.org/viewcvs?view=rev&rev=157383
Log:
Fixed: Invalid handler mapping


Modified:
    directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java

Modified: directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java?view=diff&r1=157382&r2=157383
==============================================================================
--- directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
(original)
+++ directory/apacheds/trunk/protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Sun Mar 13 20:47:24 2005
@@ -176,7 +176,9 @@
 
             try
             {
+                Class typeClass = Class.forName( type );
                 handler = ( MessageHandler ) clazz.newInstance();
+                this.handler.registerMessageType( typeClass, handler );
             }
             catch( Exception e )
             {
@@ -187,8 +189,6 @@
                 lne.setRootCause( e );
                 throw lne;
             }
-
-            this.handler.registerMessageType( clazz, handler );
         }
 
         this.codecFactory = new ProtocolCodecFactoryImpl( copy );
@@ -213,7 +213,9 @@
 
             try
             {
+                Class typeClass = Class.forName( type );
                 handler = ( MessageHandler ) clazz.newInstance();
+                this.handler.registerMessageType( typeClass, handler );
             }
             catch( Exception e )
             {
@@ -224,8 +226,6 @@
                 lne.setRootCause( e );
                 throw lne;
             }
-
-            this.handler.registerMessageType( clazz, handler );
         }
 
         this.codecFactory = new ProtocolCodecFactoryImpl();
@@ -330,5 +330,9 @@
         public void sessionOpened( ProtocolSession arg0 )
         {
         }
+    }
+    
+    public static void main(String[] args) throws Exception {
+        new LdapProtocolProvider();
     }
 }



Mime
View raw message