directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1229254 - /directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java
Date Mon, 09 Jan 2012 17:00:17 GMT
Author: gokturk
Date: Mon Jan  9 17:00:17 2012
New Revision: 1229254

URL: http://svn.apache.org/viewvc?rev=1229254&view=rev
Log:
* Used new ComponentRegistry method (getComponentByFactoryName() ) in factory departure callback

Modified:
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java?rev=1229254&r1=1229253&r2=1229254&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/hub/ComponentHub.java
Mon Jan  9 17:00:17 2012
@@ -284,18 +284,8 @@ public class ComponentHub implements Eve
             return;
         }
 
-        String componentType = parseComponentType( leavingFactory );
-
-        ADSComponent associatedComp = null;
-
-        for ( ADSComponent _comp : componentRegistry.getAllComponents() )
-        {
-            if ( _comp.getFactory().getName().equals( leavingFactory.getName() ) )
-            {
-                associatedComp = _comp;
-                break;
-            }
-        }
+        // Gets the associated ADSComponent reference with IPojo Factory.
+        ADSComponent associatedComp = componentRegistry.getCompoentByFactory( leavingFactory
);
 
         if ( associatedComp == null )
         {
@@ -309,7 +299,6 @@ public class ComponentHub implements Eve
 
         // Remove the component reference from registries
         componentRegistry.removeComponent( associatedComp );
-
     }
 
 



Mime
View raw message