directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r332269 - in /directory: apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ asn1/trunk/codec/ protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ protocol-providers/ldap/trunk/src/main/java/org/apache/...
Date Thu, 10 Nov 2005 10:47:17 GMT
Author: trustin
Date: Thu Nov 10 02:47:06 2005
New Revision: 332269

URL: http://svn.apache.org/viewcvs?rev=332269&view=rev
Log:
* Added some log messages when ExtendedOperationHandlers are added
* Fixed ExtendedOperationHandlers is not registered to two ExtendedHandler instances


Modified:
    directory/apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
    directory/asn1/trunk/codec/project.xml
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java

Modified: directory/apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?rev=332269&r1=332268&r2=332269&view=diff
==============================================================================
--- directory/apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
(original)
+++ directory/apacheds/trunk/server/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
Thu Nov 10 02:47:06 2005
@@ -374,6 +374,7 @@
         {
             ExtendedOperationHandler h = ( ExtendedOperationHandler ) i.next();
             protocolProvider.addExtendedOperationHandler( h );
+            log.info( "Added Extended Request Handler: " + h.getOid() );
         }
         
         try

Modified: directory/asn1/trunk/codec/project.xml
URL: http://svn.apache.org/viewcvs/directory/asn1/trunk/codec/project.xml?rev=332269&r1=332268&r2=332269&view=diff
==============================================================================
--- directory/asn1/trunk/codec/project.xml (original)
+++ directory/asn1/trunk/codec/project.xml Thu Nov 10 02:47:06 2005
@@ -25,5 +25,9 @@
             <url>http://directory.apache.org/subprojects/network/mina/</url>
         </dependency>
     </dependencies>
+
+  <build>
+    <unitTestSourceDirectory>${basedir}/src/test/java</unitTestSourceDirectory>
+  </build>
 </project>
 

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java?rev=332269&r1=332268&r2=332269&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Thu Nov 10 02:47:06 2005
@@ -271,6 +271,8 @@
     {
         ExtendedHandler eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequest.class
);
         eh.addHandler( eoh );
+        eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequestImpl.class );
+        eh.addHandler( eoh );
     }
     
     /**
@@ -280,6 +282,8 @@
     public void removeExtendedOperationHandler( String oid )
     {
         ExtendedHandler eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequest.class
);
+        eh.removeHandler( oid );
+        eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequestImpl.class );
         eh.removeHandler( oid );
     }
     

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java?rev=332269&r1=332268&r2=332269&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
Thu Nov 10 02:47:06 2005
@@ -75,17 +75,17 @@
         ExtendedResponse res = new ExtendedResponseImpl( req.getMessageId() );
 
         ExtendedOperationHandler handler = ( ExtendedOperationHandler ) handlers.get( req.getOid()
);
-        
         if( handler == null )
         {
             res.setLdapResult( new LdapResultImpl( res ) );
             // As long as no extended operations are implemented, send appropriate
-            // error back to the client.        
+            // error back to the client.
             String msg = "Unrecognized extended operation OID: " + req.getOid();
             
             LdapResult result = res.getLdapResult();        
             result.setResultCode( ResultCodeEnum.PROTOCOLERROR );
             result.setErrorMessage( msg );
+            session.write( res );
         }
         else
         {



Mime
View raw message