From bf62fe2d81a22e50065a0c682a4ffb2a1308122f Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 02 Feb 2007 20:35:01 +0000
Subject: [PATCH] Update the code involving change notification listeners to ensure that they are invoked just before the response is sent to the client rather than just after the response. This can help avoid race conditions in which the server needs to use a change notification listener to perform some additional processing for a given operation, and the client sends a second request that depends on this processing immediately after receiving a "success" response for the operation that triggered the change notification.
---
opends/src/server/org/opends/server/core/GroupManager.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/GroupManager.java b/opends/src/server/org/opends/server/core/GroupManager.java
index 2331842..0806dea 100644
--- a/opends/src/server/org/opends/server/core/GroupManager.java
+++ b/opends/src/server/org/opends/server/core/GroupManager.java
@@ -62,6 +62,10 @@
import org.opends.server.types.SearchResultEntry;
import org.opends.server.types.SearchScope;
import org.opends.server.types.SearchFilter;
+import org.opends.server.types.operation.PostResponseAddOperation;
+import org.opends.server.types.operation.PostResponseDeleteOperation;
+import org.opends.server.types.operation.PostResponseModifyOperation;
+import org.opends.server.types.operation.PostResponseModifyDNOperation;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.Debug.*;
@@ -1186,7 +1190,7 @@
* a group definition, and if so it will be instantiated and registered with
* this group manager.
*/
- public void handleAddOperation(AddOperation addOperation,
+ public void handleAddOperation(PostResponseAddOperation addOperation,
Entry entry)
{
assert debugEnter(CLASS_NAME, "handleAddOperation",
@@ -1213,7 +1217,7 @@
* {@inheritDoc} In this case, if the entry is associated with a registered
* group instance, then that group instance will be deregistered.
*/
- public void handleDeleteOperation(DeleteOperation deleteOperation,
+ public void handleDeleteOperation(PostResponseDeleteOperation deleteOperation,
Entry entry)
{
assert debugEnter(CLASS_NAME, "handleDeleteOperation",
@@ -1241,7 +1245,7 @@
* group instance, then that instance will be recreated from the contents of
* the provided entry and re-registered with the group manager.
*/
- public void handleModifyOperation(ModifyOperation modifyOperation,
+ public void handleModifyOperation(PostResponseModifyOperation modifyOperation,
Entry oldEntry, Entry newEntry)
{
assert debugEnter(CLASS_NAME, "handleModifyOperation",
@@ -1285,7 +1289,7 @@
* DN, and the old instance will be deregistered.
*/
public void handleModifyDNOperation(
- ModifyDNOperation modifyDNOperation,
+ PostResponseModifyDNOperation modifyDNOperation,
Entry oldEntry, Entry newEntry)
{
assert debugEnter(CLASS_NAME, "handleModifyDNOperation",
--
Gitblit v1.10.0