osgi

Break-even point for OSGi

It seems that OSGi is a hot term these days. Many benefits are invoked: Reduced Complexity Reuse Easy deployment Versioning (etc) I'm asking for a very specific use case - small to medium-sized web applications. What benefits would OSGi bring for those? It is actually worth it? ...

Eclipse rcp classloader hell: moved class still visible at compiletime but not at runtime anymore

I've a strange and new issue with an eclipse 3.5 rcp application: Everything worked fine, then I changed the running system and moved a single class from one plugin to a dependent plugin. No big issue, but all of a sudden the application complains with a class not found exception (or NoClassDefFoundError - don't know exactly but will loo...

How do i register the OSGIhost jar(itself) with DS ?

Hi, Im trying to create an application which can fire-up felix, and also publish services to the 'Declarative Services' bundle. But with my 'felix-starter' and services effectively being inside the same jar. i assume the jar containing both the osgi-host(Felix) and misc. services should contain the xml file describing the provided/re...

How let OSGi (Config Admin) persist/reuse your configuration?

I'm new to OSGi. My aim is to create a structure with the config admin, so you can enter a configuration, which will be reused after restarting the server. While I have read the api and tried some samples, I thought this feature will be included by default. My question to you: Is this possible at all and if yes: what have I to consider...

OSGi initial provisioning, talks about ZIP dictionary entries?

Hi, The osgi R4 specification on 'initial provisioning page 231' talks about 'The result of the request must be a ZIP file(content type application/ZIP)'...'The zip file may contain only four types of dictionary entries: text, binary, bundle or bundle-url. The types are specified in the ZIP entry's extra field' I don't know a ZIP fi...

Felix 'pref' bundle requires 'log version >=1.3', but D/L 'log' bundle version = 1.0

Hi, the Felix download page shows Log bundle version 1.0.0 Preferences bundle version 1.0.2 But preferences requires log-bundle version >= 1.3 It just want to get an idea of how 'preferences' works, so any log compatible bundle is welcome :) Regards. ...

Managing a Large OSGi Application

Hello, I have a large, growing OSGi application with a number of bundles. I am curious to know the best way to manage this type of application. Currently, I am using Eclipse and Maven, but although this is great for building bundles (via maven-bundle-plugin), as of now it has not been easy to manage the entire application. What I would...

How can I share non-OSGi libraries between bundles in an OSGi container?

I came across this question when trying to share the Struts packages among multiple bundles inside an OSGi container. I wanted to avoid both duplicating dependencies inside the bundles and introducing a new dependency between them (by having one bundle export its internal dependencies for the other to share). It turns out the answer is ...

mangen adds 'Bundle-ManifestVersion: 1' to manifest, but felix doesn't seem to accept value 1

Hi, I've used 'Mangen' to process my jar, which works but it adds the next line to the manifest Bundle-ManifestVersion: 1 after which Felix 1.8.0 complains with -> install file:D:/bundles/osgi_ds_1.jar.new.jar org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value: 1 at org.apache.felix.framework.util.ma...

Will eclipse/osgi activators always be called at least once before code is accessed?

In Eclipse (3.3) I have a plugin User, depending on plugin Provider. Provider has an activator. On the Plugin Editor for provider it has a checkbox "Activate this plug-in when one of its classes is loaded". Checking/unchecking this will change a Manifest setting : Eclipse-LazyStart to true/false. My question is that the checkbox, to m...

Eclipse New plugin project wizard can target eclipse versions, but where is this information saved

In Eclipse (3.3) if you start the New Plugin Project Wizard, the first page has a Target Platform, where you can target a version of eclipse. Is this information saved/used and if so where? Also if you then create an extension the plugin.xml is created, and at the top is (for me) : <?eclipse version="3.2"?> Where did this version ...

OSGi in Netbeans, ClassCastException when retrieving service

Hi, im having a ClassLoader issue. Since im quite an osgi newby, hopefully the answer isn't that hard :) I think it has to do with Compile vs. Runtime libraries. in Netbeans 6.7.1 project properties, the compiletime libs are always propagated to the other categories.. so i can't differentiate there. When compiling the FelixHost the ...

Configure Equinox to modify the management of the "local bundle cache"

Relating to a previous question, how let OSGi to reuse your configuration via Config Admin, I am still trying to solve this problem in the Equinox Framework. Pavol Juhos wrote: Equinox Config Admin (org.eclipse.equinox.cm) stores the configuration data in the persistent storage area provided by the Framework. And that happens to be ...

How can I merge multiple OSGi bundles with BND / Maven-BND-plugin?

I'm using some off-the-shelf OSGi bundles in my application and would like to repackage them together with additional packages that are not yet OSGi compatible into a new bundle. Case in point is EclipseLink, which is available as several OSGi bundles, most of which are optional, depending on what you want to do. I want to pick those bu...

In an OSGi environment, how are the classpaths and classloaders set up?

I'm confused about class visibility in OSGi. I'm running Apache Felix and loading the following bundles: the antlr, asm, jpa and core bundles from eclipselink an OSGi-fied jar for javax.persistence 1.99 an OSGi-fied jar with the com.mysql.jdbc driver a bundle of my own that contains annotated entity classes and a persistence.xml anothe...

Need to read own Jar's manifest, and not root-classloaders' manifest

Hi, i need to read the Manifest file, which delivered my class. but it seems that when i use getClass().getClassLoader().getResources(...) i end up getting the MANIFEST from the first Jar loaded into the Java Runtime. My app will be running from applet or webstart, so i will not have access to my own .jar file i guess i actually w...

Apache Felix Bundle Repository - Calling from another bundle

I have a simple test program which is designed to consume the Apache Felix Bundle Repository bundle service however I am having trouble configuring it through eclipse. I am using the jar for the bundle (org.apache.felix.bundlerepository-1.4.0.jar) as an referenced library and have added it to the classpath in the manifest. When I try t...

Is having Eclipse OSGI Activators inheriting from each other a good idea?

If you have a common eclipse/osgi code platform on which you build various products can you/should you inherit activators from the common code E.g. org.test.common.PluginActivator org.test.common.ui.UIPluginActivator org.test.product1.Product1PluginActivator org.test.product1.ui.Product1UIPluginActivator org.test.product2.Product2Plu...

Migration solution for singletons in an OSGI environment

I'm working in a JEE Environment in which each application is in a war file of its own. In the WEB-INF/lib of each application war file there is a common jar that is shared by all applications. This common jar contains several Singletons which are accessed from many points in the code. Because of the war-file boundaries each application ...

Are externalised plugin.xml strings available to downstream plugins?

If I have plugin common, with plugin A and B as separate plugins/products, both depending on plugin common. In plugin common, I externalise the strings in plugin.xml, this gives me %bundle-vendor = "My Company Name". In downstream plugins A and B, can I use the common bundle-vendor property for vendor. I tried prepending the common pl...