Good catch!  I was trying to remove the listener instead of the registration entry. 

Thanks,
Alex

On Fri, Jul 11, 2008 at 5:02 PM, <elecharny@apache.org> wrote:
Author: elecharny
Date: Fri Jul 11 14:02:38 2008
New Revision: 676079

URL: http://svn.apache.org/viewvc?rev=676079&view=rev
Log:
Fixed the registration removal of listener : we were removing the listener, not the entry containing the listener.
Fixed a comment.

Modified:
   directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
   directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java?rev=676079&r1=676078&r2=676079&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java (original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java Fri Jul 11 14:02:38 2008
@@ -87,7 +87,7 @@
        assertEquals( "objectAdded", rec.method );
        assertEquals( ctx, rec.event.getSource() );

-        // readd the entry once again just to make sure
+        // read the entry once again just to make sure
        ctx.createSubcontext( "ou=testentry", testEntry );
        assertEquals( 1, listener.getEventRecords().size() );
        rec = ( EventRecord ) listener.getEventRecords().get( 0 );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=676079&r1=676078&r2=676079&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Fri Jul 11 14:02:38 2008
@@ -334,7 +334,7 @@
            {
                if ( entry.getListener() == listener )
                {
-                    registrations.remove( listener );
+                    registrations.remove( entry );
                }
            }
        }





--
Microsoft gives you Windows, Linux gives you the whole house ...