directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r659373 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Date Fri, 23 May 2008 02:36:16 GMT
Author: elecharny
Date: Thu May 22 19:36:15 2008
New Revision: 659373

URL: http://svn.apache.org/viewvc?rev=659373&view=rev
Log:
Changed the addOperationContext

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=659373&r1=659372&r2=659373&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Thu May 22 19:36:15 2008
@@ -39,6 +39,7 @@
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
@@ -210,11 +211,8 @@
      * @param entry
      * @param target
      */
-    protected void doAddOperation( LdapDN target, ServerEntry entry ) throws Exception
+    protected void doAddOperation( AddOperationContext opCtx, LdapDN target, ServerEntry
entry ) throws Exception
     {
-        // setup the op context and populate with request controls
-        AddOperationContext opCtx = new AddOperationContext( service.getRegistries(), entry
);
-
         opCtx.addRequestControls( requestControls );
 
         // execute add operation
@@ -367,6 +365,7 @@
         opCtx.setMechanisms( mechanisms );
         opCtx.setSaslAuthId( saslAuthId );
         opCtx.addRequestControls( requestControls );
+        opCtx.setPrincipalDN( bindDn );
 
         // execute bind operation
         this.nexusProxy.bind( opCtx );
@@ -640,7 +639,10 @@
          */
         try
         {
-            doAddOperation( target, serverEntry );
+            // setup the op context
+            AddOperationContext opCtx = new AddOperationContext( service.getRegistries(),
serverEntry );
+            
+            doAddOperation( opCtx, target, serverEntry );
         }
         catch ( Exception e )
         {
@@ -740,7 +742,10 @@
         {
             try
             {
-                doAddOperation( target, outServerEntry );
+                // setup the op context
+                AddOperationContext opCtx = new AddOperationContext( service.getRegistries(),
outServerEntry );
+                
+                doAddOperation( opCtx, target, outServerEntry );
             }
             catch ( Exception e )
             {
@@ -753,7 +758,10 @@
         {
             try
             {
-                doAddOperation( target, ( ServerEntry ) obj );
+                // setup the op context
+                AddOperationContext opCtx = new AddOperationContext( service.getRegistries(),
( ServerEntry ) obj );
+                
+                doAddOperation( opCtx, target, ( ServerEntry ) obj );
             }
             catch ( Exception e )
             {
@@ -791,7 +799,10 @@
             JavaLdapSupport.serialize( serverEntry, obj, registries );
             try
             {
-                doAddOperation( target, serverEntry );
+                // setup the op context
+                AddOperationContext opCtx = new AddOperationContext( service.getRegistries(),
serverEntry );
+
+                doAddOperation( opCtx, target, serverEntry );
             }
             catch ( Exception e )
             {
@@ -815,7 +826,10 @@
             injectRdnAttributeValues( target, serverEntry );
             try
             {
-                doAddOperation( target, serverEntry );
+                // setup the op context
+                AddOperationContext opCtx = new AddOperationContext( service.getRegistries(),
serverEntry );
+
+                doAddOperation( opCtx, target, serverEntry );
             }
             catch ( Exception e )
             {



Mime
View raw message