You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2010/03/04 01:42:10 UTC
svn commit: r918796 -
/tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java
Author: rfeng
Date: Thu Mar 4 00:42:10 2010
New Revision: 918796
URL: http://svn.apache.org/viewvc?rev=918796&view=rev
Log:
Make sure discovered remote service description and sca config is registered first before the listeners are notified
Modified:
tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java
Modified: tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java?rev=918796&r1=918795&r2=918796&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java Thu Mar 4 00:42:10 2010
@@ -129,7 +129,7 @@
}
public Object addingBundle(Bundle bundle, BundleEvent event) {
- if (bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null) {
+ if (bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null || bundle.getBundleId() == 0) {
// Ignore fragments
return null;
}
@@ -157,6 +157,9 @@
// throw new ServiceRuntimeException(e);
}
}
+
+ // Add to the extenders before notifying the listeners (the endpoints may references to the config)
+ this.extenders.add(extender);
// Notify
for (ServiceDescriptions sds : extender.getRemoteServiceDescriptions()) {
@@ -167,7 +170,6 @@
}
}
- this.extenders.add(extender);
return extender;
}