summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src
diff options
context:
space:
mode:
authorrsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68>2008-07-10 21:23:38 +0000
committerrsivaram <rsivaram@13f79535-47bb-0310-9956-ffa450edef68>2008-07-10 21:23:38 +0000
commitee42116ed668c4e858f8048db290fe8e7597058b (patch)
treeb947f437095629b4f3663d1d6d3a9b6d301a4a05 /java/sca/itest/osgi-tuscany/osgi-tuscany-test/src
parent2326e754e9bc7b10338c692ff8a144e5d648d90e (diff)
Fixes for itest/osgi-tuscany
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@675762 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/osgi-tuscany/osgi-tuscany-test/src')
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java1
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java38
-rw-r--r--java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java45
3 files changed, 48 insertions, 36 deletions
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
index ab43b50273..2e3137239e 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/EquinoxTestRuntime.java
@@ -48,6 +48,7 @@ public class EquinoxTestRuntime extends OSGiTestRuntime {
Method startupMethod = eclipseStarterClass.getMethod("startup", String [].class, Runnable.class);
+ System.setProperty("org.osgi.framework.system.packages", getSystemPackages());
// Equinox version 3.2 upwards have a startup method which returns BundleContext
bundleContext = (BundleContext) startupMethod.invoke(null,
new String[] {/*"-clean", */"-console", "-configuration", "target/configuration"},
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
index 9e4a9fb9d0..0dafffdb8c 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/FelixTestRuntime.java
@@ -92,42 +92,8 @@ public class FelixTestRuntime extends OSGiTestRuntime implements BundleActivator
props.put("felix.cache.profiledir", profileDir.getAbsolutePath());
props.put("felix.embedded.execution", "true");
- String systemPackages =
- "org.osgi.framework; version=1.3.0," +
- "org.osgi.service.packageadmin; version=1.2.0, " +
- "org.osgi.service.startlevel; version=1.0.0, " +
- "org.osgi.service.url; version=1.0.0, " +
- "org.osgi.util.tracker; version=1.3.2, " +
- "javax.xml, " +
- "javax.xml.datatype, " +
- "javax.xml.namespace, " +
- "javax.xml.parsers, " +
- "javax.xml.transform, " +
- "javax.xml.transform.dom, " +
- "javax.xml.transform.sax, " +
- "javax.xml.transform.stream, " +
- "javax.xml.validation, " +
- "javax.xml.xpath, " +
- "javax.sql," +
- "org.w3c.dom, " +
- "org.xml.sax, " +
- "org.xml.sax.ext, " +
- "org.xml.sax.helpers, " +
- "javax.security.auth, " +
- "javax.security.auth.login, " +
- "javax.security.auth.callback, " +
- "javax.naming, " +
- "javax.naming.spi, " +
- "javax.naming.directory, " +
- "javax.management, " +
- "sun.misc, " +
- "javax.net, " +
- "javax.crypto, " +
- "javax.rmi, " +
- "javax.transaction, " +
- "javax.transaction.xa, " +
-
- "org.apache.felix.main";
+ String systemPackages = getSystemPackages() +
+ ", org.apache.felix.main";
props.put("org.osgi.framework.system.packages", systemPackages);
diff --git a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
index 354c545f03..6362385a13 100644
--- a/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
+++ b/java/sca/itest/osgi-tuscany/osgi-tuscany-test/src/main/java/org/apache/tuscany/sca/test/osgi/runtime/impl/OSGiTestRuntime.java
@@ -110,5 +110,50 @@ public abstract class OSGiTestRuntime {
instance = null;
}
}
+
+
+ /**
+ * @return the list of packages to be exported by the system bundle
+ */
+ protected String getSystemPackages() {
+ String systemPackages =
+ "org.osgi.framework; version=1.3.0," +
+ "org.osgi.service.packageadmin; version=1.2.0, " +
+ "org.osgi.service.startlevel; version=1.0.0, " +
+ "org.osgi.service.url; version=1.0.0, " +
+ "org.osgi.util.tracker; version=1.3.2, " +
+ "javax.xml, " +
+ "javax.xml.datatype, " +
+ "javax.xml.namespace, " +
+ "javax.xml.parsers, " +
+ "javax.xml.transform, " +
+ "javax.xml.transform.dom, " +
+ "javax.xml.transform.sax, " +
+ "javax.xml.transform.stream, " +
+ "javax.xml.validation, " +
+ "javax.xml.xpath, " +
+ "javax.sql," +
+ "org.w3c.dom, " +
+ "org.xml.sax, " +
+ "org.xml.sax.ext, " +
+ "org.xml.sax.helpers, " +
+ "javax.security.auth, " +
+ "javax.security.auth.login, " +
+ "javax.security.auth.callback, " +
+ "javax.naming, " +
+ "javax.naming.spi, " +
+ "javax.naming.directory, " +
+ "javax.management, " +
+ "javax.imageio, " +
+ "sun.misc, " +
+ "javax.net, " +
+ "javax.crypto, " +
+ "javax.rmi, " +
+ "javax.transaction, " +
+ "javax.transaction.xa";
+
+ return systemPackages;
+
+ }
}