diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-29 22:10:28 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-29 22:10:28 +0000 |
commit | 1fd00705939747143753aeae8c8aa084e3d9f800 (patch) | |
tree | 9ecb2c48a911665549388bbcba2069b6f020c53e /branches/sca-java-2.0-M3/modules/node-impl-osgi | |
parent | 1b4728bc676d02af0ddb68754167028cd5ab5773 (diff) |
Merge changes from trunk to bring up the distributed osgi samples with Tuscany distribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@789466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-2.0-M3/modules/node-impl-osgi')
-rw-r--r-- | branches/sca-java-2.0-M3/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeManager.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/branches/sca-java-2.0-M3/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeManager.java b/branches/sca-java-2.0-M3/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeManager.java index fb2e8a8305..3f71117c1a 100644 --- a/branches/sca-java-2.0-M3/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeManager.java +++ b/branches/sca-java-2.0-M3/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/impl/NodeManager.java @@ -19,8 +19,8 @@ package org.apache.tuscany.sca.node.osgi.impl; +import java.net.URL; import java.util.Dictionary; -import java.util.Enumeration; import java.util.logging.Level; import java.util.logging.Logger; @@ -68,12 +68,27 @@ public class NodeManager implements SynchronousBundleListener, ServiceListener { if (headers.get("SCA-Composite") != null) { return true; } - Enumeration<?> entries = bundle.findEntries("OSGI-INF/sca", "*", false); - if (entries != null && entries.hasMoreElements()) { + + URL bundleComposite = bundle.getResource("OSGI-INF/sca/bundle.composite"); + if (bundleComposite != null) { return true; } + /* FIXME: What if there is a META-INF/sca-contribution.xml? There are two cases: + * 1. The file contains deployable elements + * 2. The file doesn't contain deployable elements + */ + + /* + * FIXME: Do we want to use all of the .composite files under OSGI-INF/sca? + */ + /* + Enumeration<?> entries = bundle.findEntries("OSGI-INF/sca", "bundle.composite", false); + if (entries != null && entries.hasMoreElements()) { + return true; + } + // OSGi Declarative Services if (headers.get("Service-Component") != null) { return true; |