osgi

What IDE setup and workflow is used for OSGi development?

I made quite a few easy OSGi test projects in Eclipse RCP. My typical workflow would always be: Make 3 different projects: APIproject, Clientproject and Serverproject Edit the MANIFEST.MF of APIproject to export the api package Edit the MANIFEST.MF file of Clientproject and Serverproject to add the required API package Choose "Run as.....

How to use separate class loaders and run in same JVM? (OSGI)

I've read that OSGI uses separate classloaders per module which allows modules to use different versions of their dependencies.. while at the same time running all modules in the same JVM. How does this work? If module A uses version #1 of a dependency and module B uses version #2, won't you run into trouble if module A passes an inst...

What happens when a OSGi service using JNI is unregistered while in use?

As I understand, OSGi services can be unregistered anytime, including when they are in use. Consider an OSGi service which internally makes a long-running JNI call. And while that JNI call is executing, the service is unregistered by OSGi. Will the JNI call be allowed to finish or terminated mid-way? What if it was just a normal non-jn...

How to deserialize implementation classes in OSGi

In an eRCP OSGi based application the user can push a button and go to a lock screen similar to that of Windows or Mac OS X. When this happens, the current state of the application is serialized to a file and control is handed over to the lock screen. In this mobile application memory is very tight, so we need to get rid of the original ...

OSGI & Apache Commons-DBCP Classloading Issue

I inherited some code that is using the Apache commons-dbcp Connection pools in an OSGi bundle. This code works fine with Eclipse/Equinox OSGi version 3.4.3 (R34x_v20081215), commons-dbcp 1.2.2 and the postgres jdbc3 8.3.603 bundles from springsource.org. I wanted to modernize, maybe this was my first mistake! When I use the new versio...

Static content on Wicket application served from OSGi HTTP Service

I'm developing a web application that is going to be served from an OSGi HTTP service, I register it using a WicketServlet, and I don't know how to serve static files (CSS, JS, images and so). How could I mount a directory as a resource with the static content? Or should I configure the resource locator in some way? ...

How to use an OSGi service from a web application?

I'm trying to develop a web application that is going to be launched from a HTTP OSGi service, this application needs to use other OSGi service (db4o OSGi), for what I need a reference to a BundleContext. I have tried two different approaches to get the OSGi context in the web application: Store the BundleContext of the Activator in a ...

OSGI on google app engine?

I am evaluating several technologies for an open source app for the google app engine. I'm searching for information regarding OSGI on googles app engine. I have found Lemmon but it seems to be a dead project. The last checkin was in mid 2009... :-/ There is also a eclipse blog entry from april 2009, but it's not a real success story. ...

Web Application using OSGi and GWT

Which is a good architecture for a Web Application using OSGI and GWT as UI? The aim is to use bundles to make bundles of web interface sections. If I add new bundle it will add new features (a menu for example) on the user interface, which cooperate with existing ones. ...

Trouble understanding the whole OSGi web eco system

Hello, I am pretty new to the whole Java and OSGi world and I have trouble understanding the eco system of a OSGi web application. To be more precise I am at the moment trying to understand how all the parts of the eco system are related to each other: OSGi Framework (e.g. Apache Felix, Equinox, Knoplerfish) OSGi Runtime (e.g. Spring...

Knopflerfish packaging

Hello, I am at the moment creating a matrix which is showing how far Knopflerfish, Equinox and Felix are OSGi 4.2 compliant. So far I looked at the Knopflerfish documentation (Link 1, Link 2) to get an idea of how much of the Core and Compendium specs are actually implemented. The core specification seems to be fully implemented, alth...

How to modularize a JSF/Facelets/Spring application with OSGi?

I'm working with very large JSF/Facelets applications which use Spring for DI/bean management. My applications have modular structure and I'm currently looking for approaches to standardize the modularization. My goal is to compose a web application from a number of modules (possibly depending on each other). Each module may contain the...

Using Struts with SpringSource dm server gives Http Status 503 error

Hi, I developed an enterprise application using spring, struts and hibernate, now I want to transfer it to work with OSGi dm server. I found a book "Pro SpringSource dm server" where the author has explained a way to migrate WAR to OSGi bundles. I successfully migrated the application given in book. The first step of migration says th...

Recommendations for compatibility between OSGi platform releases

Assuming that it's even possible, what would be your recomendations to make a bundle compatible between different platform releases? Specially between R3 and R4. Update about my requirements: The idea was to develop a web interface for a embedded device that currently runs an OSGi R3 container but that it could be upgraded soon to R4 (...

Can I use Distributed OSGi and ConfigurationAdmin together?

Hi folks, If: I have a bundle I wish to run on n OSGi containers exporting some service; I am using DS to register the modified method for when configuration changes, so I can update the service via ConfigurationAdmin, and to export the interfaces remotely as per RFC119; I am using Discovery to call those services from other bundles o...

What's the difference between OSGI bundles and components?

getting started with osgi, i wonder what's the conceptual diffence between bundles and components. And when to use which of them. Any pointers are welcome. EDIT: Components and Bundles provide different interfaces and therefore they are probably not interchangeable ComponentContext BundleContext ...

OPS4j repository alternative

The OPS4J repository is down at present and I am trying to run pax-provision using a profile for spring-dm. My question is how do I tell maven to locate the profile information from a site other than ops4j.org. Is this possible? ideally I would like to cache all the packages from the repo especially the spring-dm details which seem neve...

How can I get Symbolic-Name of an Osgi bundle which is using one of my exported packages ?

Inside one of my implementation libraries I want to know from which user library request is coming from? Bundle A ClientCode -- > ServiceInterface Bundle B ClientCode -- > ServiceInterface Bundle C ServiceInterface ServiceImpl. And those interfaces are resolved by one of impl. bundles (Bundle C). Inside that bundle I want to kn...

Repackaging Jasper-Reports into an application specific OSGi bundle, legal or not?

Hi, I wanted to ask (probably a silly) question regarding the packaging of existing open-source components as OSGi bundles (more specifically Jasper Reports). I have an application that I am converting from a monolithic jar-hell type architecture to something more moduler and OSGi is my weapon of choice. There are various modules I hav...

How to setup an Eclipse Project with multiple Subprojects (OSGi-Bundles)

Sherlog is an OSGi-based log analyzer, if I import this project as an workspace snapshot I receive lot's of projects in my workspace, but I would prefere to have them as subprojects in a project. The other option would be to checkout from svn, but then I face other problems (I don't know how to setup the dependencies for automatically...