Все вопросы: [osgi]

133 вопросов

0
голосов
1ответов
954 просмотров

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

15
голосов
2ответов
4098 просмотров

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?

5
голосов
1ответов
1738 просмотров

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

3
голосов
1ответов
883 просмотров

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

1
голосов
2ответов
1649 просмотров

OSGi: programmatically 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

1
голосов
2ответов
1039 просмотров

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.

3
голосов
2ответов
779 просмотров

Equinox p2 for an arbitrary OSGi application?

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

16
голосов
4ответов
15116 просмотров

How to get classloader for a bundle in equinox?

I have read a lot of equinox code for this, but still can't figure out a non-hacky way of getting the classloader for a osgi bundle in eclipse equinox setup. Is there one?

0
голосов
1ответов
995 просмотров

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

4
голосов
2ответов
2442 просмотров

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

1
голосов
1ответов
2383 просмотров

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

0
голосов
1ответов
71 просмотров

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

2
голосов
1ответов
2596 просмотров

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

0
голосов
1ответов
292 просмотров

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

0
голосов
1ответов
179 просмотров

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?

1
голосов
1ответов
1215 просмотров

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.* classe...

25
голосов
10ответов
37526 просмотров

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

11
голосов
4ответов
1971 просмотров

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?

3
голосов
1ответов
392 просмотров

Equinox: Update of bundle lost after framework restart

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

1
голосов
2ответов
1924 просмотров

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

0
голосов
2ответов
4371 просмотров

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

3
голосов
2ответов
891 просмотров

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

5
голосов
2ответов
4134 просмотров

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

2
голосов
6ответов
564 просмотров

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

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

0
голосов
4ответов
822 просмотров

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

15
голосов
4ответов
17528 просмотров

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

1
голосов
1ответов
1040 просмотров

Pax-import-bundle and Spring DM bundles

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

6
голосов
3ответов
21426 просмотров

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

2
голосов
1ответов
229 просмотров

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

3
голосов
2ответов
2897 просмотров

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