diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany')
4 files changed, 9 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/OSGiNodeFactoryImpl.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/OSGiNodeFactoryImpl.java index 09e32ccc56..c79fc04c4d 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/OSGiNodeFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/OSGiNodeFactoryImpl.java @@ -90,7 +90,7 @@ public class OSGiNodeFactoryImpl extends NodeFactoryImpl { } } // Set the bundle - configuration.getExtensions().add(bundle); + // configuration.getExtensions().add(bundle); return configuration; } @@ -125,8 +125,8 @@ public class OSGiNodeFactoryImpl extends NodeFactoryImpl { @Override protected Object getNodeKey(NodeConfiguration configuration) { - // Use the bundle as the key - return configuration.getExtensions().get(0); + // each bundle might have more than one nodes started + return super.getNodeKey(configuration); } @Override diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceExporter.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceExporter.java index fc4d3971cf..49dc8c7461 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceExporter.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceExporter.java @@ -80,7 +80,7 @@ public class OSGiServiceExporter extends AbstractOSGiServiceHandler implements S configuration.setDomainURI(domainURI); } configuration.setURI(contribution.getURI()); - configuration.getExtensions().add(reference.getBundle()); + // configuration.getExtensions().add(reference.getBundle()); Component component = contribution.getDeployables().get(0).getComponents().get(0); ComponentService service = component.getServices().get(0); service.getExtensions().addAll(getOSGiProperties(registry, reference)); diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceImporter.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceImporter.java index 66d4349feb..d33fd5a5e6 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceImporter.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceImporter.java @@ -65,7 +65,7 @@ public class OSGiServiceImporter extends AbstractOSGiServiceHandler { configuration.setDomainURI(domainURI); } configuration.setURI(contribution.getURI()); - configuration.getExtensions().add(bundle); + // configuration.getExtensions().add(bundle); // FIXME: Configure the domain and node URI NodeImpl node = new NodeImpl(nodeFactory, configuration, Collections.singletonList(contribution)); node.start(); diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java index 572dd129a9..45c563dc21 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java @@ -128,6 +128,10 @@ public class LocalDiscoveryService extends AbstractDiscoveryService implements B } public Object addingBundle(Bundle bundle, BundleEvent event) { + if (bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null) { + // Ignore fragments + return null; + } Collection<URL> scaConfigs = getConfiguration(bundle, "SCA-Configuration", "OSGI-INF/sca-config/*.xml"); Collection<URL> descriptions = getConfiguration(bundle, "Remote-Service", null); if (scaConfigs.isEmpty() && descriptions.isEmpty()) { |