osgi

OSGI - handling 3rd party JARs required by a bundle

I'm just getting started with OSGI development and am struggling to understand how best to handle dependant JARs. i.e. if I'm creating a bundle the likelyhood is that I will need to use a few 3rd party JARs. When I create my bundle JAR to deploy to OSGI, obviously these 3rd party JARs are not included and thus the bundle will not run. ...

What is the relationship between OSGi and Dependency Injection

What are they of each other? Specification and implementation? Competitors? Unrelated? ...

Working example for a remote OSGI service

Hi , I am new to programming with OSGI. Can anyone provide me a working example of a client/server osgi service invocation. I have been trying to acheve this for the last 2 weeks without any success. My service is being discovered and executed by an eclipse instance in the same machine, but when I try the same thing from another mach...

OSGI - static method calls across bundles

I have a 3rd party JAR that I have converted to an OSGI bundle using bnd. The code I need to call to use it from my own bundle looks something like this: ThirdParty.setRegKey(myRegKey); ThirdParty thirdParty = new ThirdParty(); thirdParty.callMethod(); What seems to be causing me problems is the first line - the static method call. ...

Java OSGi Centralised Network Configuration

I'm looking to create an app based on the OSGi model. One of the elements of this will be network access (http and obr initially) I am looking for a way of centralising the network config (proxying, encryption, etc) perhaps to a single bundle that the rest of the app can call into. Has anybody done this/got ideas? Thanks ...

Load DLL (using JNA) inside an OSGi bundle

OSGi cannot find my DLL file, and I can't seem to figure out why. Currently I have the DLL file (foo.dll) at the root of my bundle, I've also tried having it in a libs directory. The Manifest for the bundle in question looks something like this: Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: foobundle Bundle-SymbolicName...

Pax-import-bundle and Spring DM bundles

Hi, I'm following the examples from Modular Java but I'm having trouble with chapter 6 and adding the Spring DM modules to my project. I run: pax-import-bundle -g org.springframework.osgi -a spring-osgi-extender -v 1.2 -- -DwidenScope -DimportTransitive When running pax-provision the Spring DM bundles are not resolved. I get complaint...

Embedding JARs into the OSGi bundle with maven-bundle-plugin

I’m trying to embed some JARs into single OSGi bundle using the feature of maven-bundle-plugin The thing that worries me is that all packages of embedded JARs are put into the Import-Package header of the generated MANIFEST.MF. If I specify explicitly to use only the packages I need, like in the following snippet: Import-Package: org...

Are there any Java-compilers that leverage an OSGi-environment instead of using the classpath?

Are there any ways to make javac use an existing OSGi-environment for the resolution of build-time dependencies instead of setting the classpath explicitely? I know I could write an OSGi-component that uses the Compiler-API of the JDK, but I think there should be a more straightforward solution. Alternatively, if no such extension is av...

Should I use Eclipse plug-ins (or OSGi Bundles) as a plain dependency management tool?

Heya, once again it has happened... I joined a new project, composed of several plain Eclipse Java Projects, with interdependencies, all managed through the Project build path. I find this all a bit of a chaos. And when it comes to run configurations - you just enter hell. In the past I've sticked to create plug-in projects, instead of...

Including additional resources with OSGi bundles

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

Dependency Injection/IOC when extending the Eclipse IDE

Suppose I am building a very simple eclipse plugin for creating new java projects. I obviously will create a new Wizard for the extension point org.eclipse.ui.newWizards. However, what I really want is to allow other plugins to implement a service that drives this new wizard. So in theory we have three plugins: My "Primary Plugin" (w...

Is it possible to run OSGi components within Weblogic 10.3?

Is it possible to run OSGi components within Weblogic 10.3? From what i have read it is not possible but im asking just to be 100% sure. There is no option to swap out WL 10.3 so there is no need to list any other application servers or OSGi containers. Thanx ...

Inbound Transformer on Spring Integration Proxy Gateway

I'd like to configure a process that looks something like: Method Call -> Dynamic Proxy Gateway -> Channel -> Service Activator -> Method Call ^---------- Transformer <- Channel <- [return value] Effectively, I'd like to somehow access the hidden channel Spring Integration creates and transform the return mess...

Equinox: Update of bundle lost after framework restart

Hi all! I've got a running equinox osgi framework with a bunch of started bundles. Now i update a bundle using the osgi console via 'update . (or use provided method: bundle.update(url)); Everything works perfectly... but if i completly restart the osgi framework the previously updated bundle is in the original state again (as it was ...

What's new in OSGi 4.2?

OSGi 4.2 has just been released which updates the 4.1 specification with a few new RFCs. So, what's particularly new with OSGi 4.2, which frameworks support 4.2 already (or are close to) and why should you target new developments against a 4.2 framework instead of a 4.1? ...

How to make code modular?

I have some Java programs, now I want to find out whether it is modular or not, if it is modular then up to what extent, because modularity can never be binary term i.e. 0 or 1. How do I decide that particular code is modular upto this much extent. I want to know how to make code much more modular? ...

Who loads javax.swing.* classes in Equinox osgi container?

I read some equinox code and doc. I came to understand that, at present, only class loading for java.* packages are delegated to the parent classloader(given that i have not modified org.osgi.bootdelegation property, which by the way seems to be null). Then who is loading the javax.swing.* classes. I have not mentioned it anywhere in the...

Equinox Bundle import conflict

1) Bundle A reexports package com.X, which it gets from bundle C 2) Bundle B exports package com.X 3) Now bunlde D has dependency on both A and B. From where will the bundle D get the package com.X from? ...

Can we contribute a new plugin.xml to ExtensionRegistry

I have a some additional xml files(containing standard eclipse extensions) that lie outside the bundle. Is there a way that I could contribute the extns/extnpoints in those files to the platform's extension registry? I tried `Platform.getExtensionRegistry.addContribution(..)` But the method takes a masterToken object, which I dont h...