Author: jmarino
Date: Wed Sep 6 21:49:40 2006
New Revision: 440975
URL: http://svn.apache.org/viewvc?view=rev&rev=440975
Log:
minor internal changes to OSGi launcher to pass bundle context
Modified:
incubator/tuscany/java/sca/runtime/osgi/pom.xml
incubator/tuscany/java/sca/runtime/osgi/src/main/java/org/apache/tuscany/osgi/LauncherActivator.java
Modified: incubator/tuscany/java/sca/runtime/osgi/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/osgi/pom.xml?view=diff&rev=440975&r1=440974&r2=440975
==============================================================================
--- incubator/tuscany/java/sca/runtime/osgi/pom.xml (original)
+++ incubator/tuscany/java/sca/runtime/osgi/pom.xml Wed Sep 6 21:49:40 2006
@@ -74,8 +74,8 @@
<configuration>
<ignorePackage>com.sun.msv.grammar,
com.sun.msv.grammar.trex, com.sun.msv.reader,
com.sun.msv.reader.trex.ng, com.sun.msv.reader.util,
com.sun.msv.util, com.sun.msv.verifier,
- com.sun.msv.verifier.regexp,
javax.resource.spi.work</ignorePackage>
-
+ com.sun.msv.verifier.regexp, javax.resource.spi.work
+ </ignorePackage>
<osgiManifest>
<bundleName>${pom.name}</bundleName>
<bundleDescription>${pom.description}</bundleDescription>
@@ -83,7 +83,6 @@
<bundleLocalization>plugin</bundleLocalization>
<bundleSymbolicName>org.apache.tuscany</bundleSymbolicName>
<bundleActivator>org.apache.tuscany.osgi.LauncherActivator</bundleActivator>
-
<!--<exportPackage>org.apache.tuscany.*</exportPackage>-->
</osgiManifest>
</configuration>
Modified:
incubator/tuscany/java/sca/runtime/osgi/src/main/java/org/apache/tuscany/osgi/LauncherActivator.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/osgi/src/main/java/org/apache/tuscany/osgi/LauncherActivator.java?view=diff&rev=440975&r1=440974&r2=440975
==============================================================================
---
incubator/tuscany/java/sca/runtime/osgi/src/main/java/org/apache/tuscany/osgi/LauncherActivator.java
(original)
+++
incubator/tuscany/java/sca/runtime/osgi/src/main/java/org/apache/tuscany/osgi/LauncherActivator.java
Wed Sep 6 21:49:40 2006
@@ -18,12 +18,14 @@
*/
package org.apache.tuscany.osgi;
+import java.io.File;
import java.net.URL;
import org.apache.tuscany.spi.component.CompositeComponent;
import org.apache.tuscany.api.TuscanyException;
import org.apache.tuscany.core.launcher.LauncherImpl;
+import org.apache.tuscany.core.monitor.NullMonitorFactory;
import org.apache.tuscany.osgi.util.BundleContextUtil;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -37,6 +39,8 @@
public void start(BundleContext context) throws Exception {
BundleContextUtil.setContext(context);
+ startRuntime(context);
+
}
public void stop(BundleContext context) throws Exception {
@@ -46,15 +50,17 @@
}
- private void startRuntime() throws OSGILauncherInitException {
+ private void startRuntime(BundleContext context) throws
OSGILauncherInitException {
launcher = new LauncherImpl();
// Current thread context classloader should be the webapp classloader
ClassLoader webappClassLoader =
Thread.currentThread().getContextClassLoader();
launcher.setApplicationLoader(webappClassLoader);
try {
+ System.out.println(":::" + new File(".").toURL().toString());
// URL systemScdl = getSystemSCDL(systemScdlPath);
- // CompositeComponent<?> rt = launcher.bootRuntime(systemScdl, mf);
+ CompositeComponent<?> rt =
+ launcher.bootRuntime(new
File("./sca/system.scdl").toURI().toURL(), new NullMonitorFactory());
} catch (Exception e) {
throw new OSGILauncherInitException(e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]