osgi

Spring context loading problem in Osgi

Hi, I'm using Spring's FileSystemXmlApplicationContext in Osgi activator. Unfortunately, it doesn't load any bean from the provided XML files. I'm sure that it finds the xml configuration files, because I was testing with incorrect name of my xml configuration file, and it threw an FileNotFoundException. Here is a snippet from my cod...

Servicemix 4, DOSGi, and Zookeeper

This is cross posted from the fusesource forum and the servicemmix forum. I can't get DOSGi working in FUSE. I'm trying to get CXF's DOSGi 1.1-SNAPSHOT with Zookeeper discovery onto FUSE 4.1.0.2. I'm also using Zookeepr 3.2.1. Everything works perfectly on Felix 2.0.0. I just follow the instructions on the DOSGi Discovery page an...

Split away Selection Service from o.e.ui.workbench bundle

I want to use Selection Service feature from the eclipse RCP in my swing project. Currently the o.e.ui.workbench bundle which contains the related interface is around 3.7 MB, that's way too huge for our requirement Is there any way to split it the workbench to get only the selection service Are there distros already for this Is it leag...

Running JAI in OSGi

I'm trying to run Java Advanced Imaging (JAI) within an OSGi container (spring-dm). I'm able to access the JAI libraries, but receive the following error when I call JAI for the first time: Error: Could not load mediaLib accelerator wrapper classes. Continuing in pure Java mode. Occurs in: com.sun.media.jai.mlib.MediaLibAccessor com.s...

RMI client in a OSGi container

I need to expose a RMI-based system in an OSGi bundle. The RMI client "bundle" is a jar which I converted into a OSGi bundle using the bnd tool (I don't have access to the sources) and at least in eclipse everything seems to be fine, but when I try to connect to the RMI server, a ClassCastException is throwed, much probably because eithe...

How to configure a system-wide package in osgi?

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 librar...

How to get classloader for a bundle in equinox?

How can I get the classloader for a osgi bundle in eclipse equinox setup. Thanks, Suraj ...

Equinox p2 for an arbitrary OSGi application?

Hello. I am designing a software system which I think I am going to implement on an OSGi platform. It is going to be a software system running on self-service terminals. OSGi idea suits well for my demands of managing devices and end-user related functionality. I think I am going to use Equinox as the OSGi implementation. So I came up w...

ServiceTracker sometimes misses services?

I have an OSGi service tracker with a filter. I noticed that there's a service that it misses ('addingService' is not called). When I use the services command in my osgi (equinox) shell, with the filter that the tracker uses, the missed service is returned. ...

OSGi: programmitically add imports to a bundle

How can I add packages to a bundle's import from within code? I need it since I use libraries which rely on reflection and require other packages and I don't want to need to manually add those packages to MANIFEST.MF for each bundle I develop ...

Does Tycho work with Eclipse 3.5

I've finally got round to looking at Tycho (a bridge between Maven 3 and OSGi), but I am not getting very far. Following this tutorial I have downloaded Tycho 0.3.0-DEV-1819 and the tychodemo.zip and unpacked them both as instructed. I have a 1.5.0_15 JDK set as JAVA_HOME. When I run (without the newline): c:\tycho\bin\mvn org.codehaus...

Where should I put shared testing utilities in a multi-module Maven project?

I probably sholdn't obsess about this too much, but my project has a very structured layout that I have become very fond of. Having that much structure has actually proven to be useful, this time, so I don't really want it to become messy again. To start with, each module consists of several Java packages: com.mycompany.mysoftware.modu...

When should I use a platform like OSGI and when it must be avoided?

My question is pretty straightforward: What are the features of an application that force the developer to exploit OSGI-like system? What are the cases, when such a utility is unneeded? ...

How can I make JDBC drivers pluggable in an OSGi environment?

I have an OSGi project that, among others, contains one bundle with JPA annotated domain models and another which uses Eclipselink as persistency provider. The latter instantiates the EntityManager using a configuration parameter to determine the JDBC driver's class name. Now, the bundle with the models needs to be able to see the JDBC ...

What are reasons for eclipselink failing to autodetect entity classes?

I'm running eclipselink in an OSGi container and my entity classes are in their own bundle. I have repeatedly run into the problem that Eclipselink fails to autodetect the entity classes, resulting in "Xyz is not a known entity type" messages. This is painful to debug and my somewhat helpless approach is to more or less randomly tweak c...

How to extend / amend OSGi lifecycle management?

I have a modular application that uses OSGi for lifecycle and dependency management. However, some of the bundles require some time after startup to be ready, for example, because they have to acquire data from somewhere. Also, they might be unable to process certain calls during a configuration update, for example a bundle that keeps a ...

Lift and Eclipse RCP Integration

I work on a fairly simple but large two-tier application that consists approximately 40 Eclipse RCP plugins. We have a new use case that is taking us to the web for a very small portion of this functionality. I'd like to prototype this using Lift. Clearly, I'm facing a few challenges. Lift + OSGi. Can Lift get at OSGi bundles? Can...

What is the proper way of disabling an OSGi service at service start?

I have created an OSGi bundle with an exposed (declarative) service. If I, when activate is called, notice that something is amiss such that I can not provide the service, I need to prevent it from being exposed. At the moment the activation function looks like so: public void activate(ComponentContext context, Map<String, Object> prope...

Choosing between Impala and OSGi

I've been investigating OSGi for my company's software, but have recently been recommended to take a look at Impala. According to its web page, Impala is "a dynamic module framework for Java-based web applications, based on the Spring Framework." At a glance, and looking at this blog post about the differences, the key differences I can...

How do I add 3rd-party OSGi bundles to a deployment package with Maven?

I'm building my application to run in an OSGi container. I use Maven and the Maven Bundle Plugin from Apache Felix to set up the OSGi manifests for my own modules and that works great. Now, I'm deploying my bundles into an OSGi container together with several 3rd party libraries. Some of these are already OSGi-fied when I get them from ...