Archive for the ‘ OSGi ’ Category
In the post ‘Basics about OSGi Classloading’ we have learned the fundamental knowledge how Classes are defined and loaded within OSGi. And we have worked with ‘pure’ OSGi Bundles. But there is another ‘type’ of a Bundle, called Fragment. Basically a Fragment is an extension to its Host-Bundle. And because such a Fragment will lead [ READ MORE ]
Hi, Just a quick tip. If you need to find the bundle which does contain a specific Class, use FrameworkUtil#getBundle(java.lang.Class classFromBundle) In equinox it does reside in the bundle org.eclipse.osgi. Then you can get all the information you may require from the bundle. E.g. you can use this to get your bundles’ context and register [ READ MORE ]
The org.eclipse.equinox.ds bundle released with Eclipse Galileo supports lazy activation of declarative services. The source code of org.eclipse.equinox.ds is located at dev.eclipse.org/cvsroot/rt/org.eclipse.equinox/compendium/ bundles/org.eclipse.equinox.ds And there we will find the following source code lines: Important is the check if the bundle is in the LAZY_ACTIVATION state. In this case the bundle will also be started in [ READ MORE ]
In our opinion one of the biggest improvements to OSGi comes by classloading. Just as basic as it is the more important it becomes. This topic will present some basics of OSGi classloading – what you can do, what it implies and what’s the meaning of. Let us start off from the ground. The basic [ READ MORE ]
The following code-lines will give you the possibility to find the bundle which exports a specific package. Note: It’s not considered that different versions of a bundle may be available. be happy until cancelled, Your Codescale’s public class LookupExportedPackage { /** * Lookup for a bundle which exports the specified * <code>packageName</code>. Else <code>null</code> will [ READ MORE ]
Simple question: “What will happen if a bundle stops but his service is in use?” Maybe you remember my topic on ‘How-To and Why-To use an OSGi-Service or Eclipse-ExtensionPoint‘. In that i’ve also given a simple example on an osgi-service. There we’ve got one supplier who distributed books to a library. Also we’ve got one customer [ READ MORE ]
You may know that the osgi classloading is a bit different as usual. In Equinox there are also Buddies and Fragments which effect the Classloading. This influences a Class.forName() as well as Class.getResource() (If you need to load a resource also try bundle.getEntry() !). If you load by getSystemResource(), forget about this command! You will [ READ MORE ]
Last time i have written about how to use OSGi Services and Eclipse Extension Points. Also i have covered the point in which specific context a OSGi Service or an Eclipse Extension Point came to play. One difference was that the bundle which made an extension compared with a bundle which registered a service was [ READ MORE ]
OSGi is “Model” which defines a component-based framework. A best known implementation is the equinox-framework developed and used by eclipse. In equinox you can use OSGi-Services and additional Eclipse-ExtensionPoints. My question was: For what reason and in which usecase do i have to use an OSGi-Service or an Eclipse-ExtensionPoint? ‘Danail Nachev’ gives an answer at [ READ MORE ]
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 2 other followers
Get every new post delivered to your Inbox.