osgi

OSGi ConfigAdmin not clear about value types for update Dictionary

The OSGi ConfigAdmin passes a Dictionary instance into ManagedService.updated(); the service is then expected to extract the new values from the dictionary. That's great and works fine, but one thing that I have so far not been able to find explained anywhere is whether the dictionary value types are supposed to be specific (Integer, Lon...

How to cluster and load balance a Spring + OSGi app

Hi I am considering to develop an web application with Spring and OSGi. It seems like they fit together nicely. What are the options for clustering and loadbalancing such an app and what are the pros and cons of each? Thanks ...

What ordering guarantees are provided on ServiceListener and ServiceTracker calls?

I'm trying to understand what guarantees are provided for service events. The OSGi spec says that ServiceEvents are synchronous, I've taken this to imply that a ServiceListener will not receive a serviceChanged() call with an UNREGISTERING ServiceEvent until the serviceChanged() call with a REGISTERED ServiceEvent has completed. Is this...

Export OSGI-Application from Eclipse

I've developed an osgi application (no rcp) using eclipse. It consists of several Plugin-Projects-Bundles and dependencies from eclipse plugins folder (commons.* ...) The application works fine when launched using eclipse. What is the best way to export and deploy such an application from eclipse? Is there a simple way to export my la...

Accessing a web service from your browser

I'm relatively new to how web services work so I've gone though a tutorial from http://blog.saminda.org/2008/07/light-weight-osgi-based-axis2-powered.html which sets up a web service that prints hello. The code to print out hello is here. In the same project here, there is another web service that adds two numbers together. To access...

OSGI + Spring-DM cross-bundle dependency deadlock

As the title suggests, I'm having problems with OSGI + Spring DM. In my project design, i have a bundle A that requires a service svB and exports service svA. Bundle B requires svA and exports svB (among other things, of course). This seems to be causing a deadlock, as it appears both bundles are waiting for the other to go online. Is t...

How can I catch connection requests in my framework?

I'm building a framework (OSGi-like) where other parties can program a bundle for. But I want my framework to manage the QoS of the connection-requests that the other parties will do. The easy solution would be to ask them to use (or enforce them to use - although I don't know how) a specific ConnectionRequest bundle of the framework. T...

How to spoof a java package (and thus a part of the API) in OSGi?

Is it possible to spoof a part of the standard Java API, by exporting your own bundle that replaces this API? Of course with the same interfaces. Would it then be possible for other bundles, not to notice that actually they aren't using the java package, but your own package. ...

Eclipse: starting custom eclipse app under linux returns to the command line prompt instantly

Hi, I am developing an Eclipse/Equinox based OSGI WebApplication (using embedded Jetty) and using headless PDE-Build for building the app. My build creates a zip file for Linux GTK and one for my local macosx. This has worked well so far and I could just unzip the linux zip file on my Debian based server and run ./eclipse from the comma...

How to handle packages provided Java using Eclipse P2

I got some OSGi bundles in binary form that declare dependencies to bundles like "org.ietf.jgss" which are provided by Java itself. P2 detects these dependencies and when I try to install the product later using the P2 director application the installation fails since no bundle provides these packages. But if I use the P2 product build I...

What problem does Peaberry for Guice solve?

I understand the problem that OSGI solved thanks to this question.... http://stackoverflow.com/questions/106222/what-does-osgi-solve And I am already convinved that Guice is amazing so I'm curious what this OSGI integration for Guice known as "peaberry" is supposed to do, it seems to be popping up everywhere, even in Maven 3 presentati...

How to configure Maven to generate the correct named OSGi bundle

I'm using the maven-bundle-plugin to generate my bundles. One issue that bug me is that the finalName (jar file) does't conform with the actual bundle name. Internally the bundle plugin convert the version from Maven format to OSGi format (ex: 1.0-SNAPSHOOT => 1.0.0.SNAPSHOOT) How should the actual propper OSGi naming can be extracted...

Using JACORB in OSGI

Hello, I'm trying to use JACORB from am OSGI-Bundle. I read about people, who had a lot of trouble getting it up and running. Does anyone of you have any experience with including JaCORB into an OSGi-Bundle? Thanks Moritz ...

Junit test with Osgi doesn't start the Jpa component

We're using OSGI and want to write a JUnit Systemtest. We have one component, that interacts with the database using the Java Persistence API (JPA). When we're launching the test, we get an error message, that the database component couldn't be activated. We think, that this error occurs, because jpa doesn't find the persistence.xml. B...

Netbeans and osgi bundle development

Hi, I'm about to star an OSGI project using netbeans 6.8 and felix 2.0.4; can anybody provide me with tips and/or links to get started quickly ? Thanks in advance. ...

Eclipse RCP Application Fails to launch second time

I have an Eclipse RCP application that will launch properly after a clean install (right after build). The issue is that if I try to launch the application a second time the application throws an exception. I have narrowed the issue down to this file being created after the first run: ~install_dir/configuration/org.eclipse.osgi/.state ...

How can I start an OSGI bundle at runtime?

I need to wait to start a bundle during the execution of another bundle, is this possible? ...

How to profile the execution of an OSGi deployment?

I'm starting the development of an OSGi bundle for an application that will be deployed in a device with some hardware limitations. I'd like to know how could I profile the execution of that bundle to be always sure that it's going to fit with its dependencies in the final device. It would be nice to have a profiler to know how much memo...

Starting Wicket web application with OSGi HTTP Service

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("/",...

What is an appropriate way to separate lifecycle events in the logging system?

I have an application with many different parts, it runs on OSGi, so there's the bundle lifecycles, there's a number of message processors and plugin components that all can die, can be started and stopped, have their setup changed etc. I want a way to get a good picture of the current system status, what components are up, which have p...