servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r751755 - /servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
Date Mon, 09 Mar 2009 17:00:19 GMT
Author: gnodet
Date: Mon Mar  9 17:00:19 2009
New Revision: 751755

URL: http://svn.apache.org/viewvc?rev=751755&view=rev
Log:
Avoid registering osgi powered components twice

Modified:
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java?rev=751755&r1=751754&r2=751755&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
Mon Mar  9 17:00:19 2009
@@ -424,7 +424,9 @@
         registerService(bundle, new String[] { Component.class.getName(), ComponentWrapper.class.getName()
},
                         component, props);
         // Now, register the inner component
-        registerService(bundle, javax.jbi.component.Component.class.getName(), innerComponent,
props);
+        if (!wrappedComponents.containsKey(name)) {
+            registerService(bundle, javax.jbi.component.Component.class.getName(), innerComponent,
props);
+        }
         getManagementAgent().register(new StandardMBean(component, Component.class),
                                       getNamingStrategy().getObjectName(component));
         return component;
@@ -616,6 +618,7 @@
             descriptor.setComponent(componentDesc);
 
             try {
+                wrappedComponents.put(name, true);
                 ComponentInstaller installer = new ComponentInstaller(this, descriptor, null,
autoStart);
                 installer.setBundle(reference.getBundle());
                 installer.setInnerComponent(component);



Mime
View raw message