osgi

Embedding Knopflerfish in Android doesn't work

徘徊边缘 提交于 2019-12-30 07:29:40
问题 I am trying to embed the Knopflerfish framework into an android application to load and unload bundles dynamically. I followed this tutorial The first step I did is to download framework.jar frome this link, and to add it to my class path in my eclipse project. Additionally, below is my onCreate() method: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Map fwprops = new Hashtable(); //CHANGED // add any

Including additional resources with OSGi bundles

白昼怎懂夜的黑 提交于 2019-12-30 05:02:06
问题 I'm working on an OSGi bundle which implements a service as a wrapper around a native executable. That is, the service runs the executable with ProcessBuilder , feeds it some data, and retrieves the result. My question is about the best way to package this bundle. The native executable includes a number of dependent data files which all must be present on disk for the tool to run. I've found plenty of references on dealing with native DLLs in OSGi, but none that address files associated with

How to work with frequent local snapshot bundle deployments on Karaf?

浪子不回头ぞ 提交于 2019-12-29 19:00:06
问题 I decided to build an application on top of OSGI and Karaf - I really like this stuff. However, I'm struggling a bit with a daily deployment on my local, development machine. I mean.. I make a change and then I would like to test it on my local Karaf instance. And it can happen like couple times per hour. The way I'm doing it now is a maven build that creates a JAR bundle and then it's copied into the Karaf's deploy directory. I think that it isn't elegant at all. I was trying to find a way

Starting Wicket web application with OSGi HTTP Service

為{幸葍}努か 提交于 2019-12-29 08:07:12
问题 I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias"

Better handling of Thread Context ClassLoader in OSGi

为君一笑 提交于 2019-12-29 02:51:27
问题 I've been using OSGi for a while now and I have various solutions to the problems I encountered. I wanted to revisit one of these and see if people had come up with different solutions. One of the most common issues I have with OSGi (Equinox 3.4.2) is the frequent unavailability of the Thread's context ClassLoader. I know this is partly an Equinox problem, but I have encountered the issue with Felix as well. I encounter this mostly with 3rd party libraries that start their own Threads or

java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory

只愿长相守 提交于 2019-12-25 16:44:09
问题 Server server = new Server(9090); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); server.setHandler(context); // Add the echo socket servlet to the /echo path map context.addServlet(new ServletHolder(HelloWorldWebSocket.EchoServlet.class),"/echo"); try { server.start(); context.dumpStdErr(); server.join(); } catch (Exception e) { // TODO Auto-generated catch block } public class HelloWorldWebSocket { @WebSocket public

Launching an Eclipse 3.x RCP Application using bndtools

五迷三道 提交于 2019-12-25 16:07:25
问题 I have spent the past few days trying to find a solution to my problem. I am trying to launch an Eclipse RCP using the 3.x compatibility layer using the bndtools launcher via a bndrun file. I am aware of the solution which involves placing bndtools.runtime.eclipse.applauncher in the list of run bundles in order to get an E4 application to start and that there are ways to migrate an E3.x application to E4. We would like to maintain programmatic control over the Rich Client Platform for the

Starting a Bundle on Knopflerfish embedded into Android doesn't work

人走茶凉 提交于 2019-12-25 10:58:50
问题 I am embedding Knopflerfish framework into an android application to start and stop bundles dynamically. I followed this tutorial, downloaded framework.jar frome this link, and added it to my class path in my eclipse project. Additionally, below is Activity class, which launches the framework and starts one bundle: package com.example.knopflerfish_android; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Dictionary; import java.util.Hashtable;

OSGi GWT org.apache.commons.mail.EmailException

天大地大妈咪最大 提交于 2019-12-25 10:05:13
问题 I have an OSGi application which has a command line interface and a GWT interface. I have a separate bundle that is responsible for sending emails. It uses Apache Commons Email. The email bundle only provides one method for sending email and all of the properties are hard coded at the moment. When I send the email from the command line, it gets a reference to the bundle and sends off the email with no problem. When I send the email from the GWT interface, it gets a reference to the bundle and

How to configure a system-wide package in osgi?

≡放荡痞女 提交于 2019-12-25 08:47:53
问题 I need to made available a library to some bundles. This library makes use of RMI, so it needs (as far as I know, at least) to use the system class loader in order to work (I tried to "osgi-fy" the library, which results in classcastexceptions at runtime). So what I did was to remove the dependencies from the bundles that use that library, compile them with the library included in the property jars.extra.classpath (in the build.properties of the eclipse project). Then I added org.osgi