summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-12-08 19:29:52 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-12-08 19:29:52 +0000
commit7909322553fdf1fab8855fc9a9887564f3476d3c (patch)
tree1fdc06ca2ad06ab6e9aaa33f9c250cdcb252b09f /sca-java-2.x/trunk/modules
parent0f0e464e0f551e6e3c0d86eb38ec2244e330b4df (diff)
Use the defualt node key (domainURI+nodeURI)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@888534 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/OSGiNodeFactoryImpl.java6
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceExporter.java2
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/OSGiServiceImporter.java2
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java4
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()) {