and todays toy to waste my life playing with is the OSGI SOA based stuff. So in order to develop some server components, I have decided to use OSGI as it seems to fit nicely what I want to do.
First of all, I now try to find a nice container to best fit my needs. In the past (some years ago) I did some OSGI development and ended up using Equinox as the container. As far as I recall, this was due to some lacking features from other containers etc. So once again I started playing with Equinox as still seems to be most updated and being the core of Eclipse seems to be likely to be highly updated in the future as well.
But, as usual, the documentation for Equinox seems to suck big time. What I want is to have some automated deployment of my ant-packaged jar files to the container as I start it or whatever. I do not wish to type cryptic file URL’s etc. all the time. I could not find easy way to do this in Equinox. On Windows, it seems to lose all the bundles I install between reboots. So trying with update commands etc. does not seem to work. And all the strange directories it creates are also evil.. Maybe some of this is just my prejudice but it seems to suck. Not for the implementation, I think that is just great. Except for the fact that it is tied to Eclipse and starting the standalone jar with specified config dir seems to be impossible in Linux for a dumbass like me, because it looks for some cryptic Eclipse config directories. But I like to know what I am working with and how to use it. I was also interested in the optional services OSGI specifies and how to use them. Googling for some of them takes me to the Apache Felix site. So I decided to take a look at that then..
And now I decided to use Felix as my OSGI container for development at least. It is very nicely documented and focused on just providing a specific OSGI container. Even the optional services are nicely documented with clear code examples. Downloads seems a bit confusing but I’ll survive.
To make for automated loading and updating of all my bundles, I made a “bundles” directory where my ant-script tosses all the created jar files and copies all the bundles from the Felix install dir (OSGI console UI, etc.) to this same directory. Then passing this directory to the Felix install as the bundle dir causes it to find all my bundles. Changing the conf/config.ini dir to “load,update,start” all bundles causes it to automatically install all of them as I start the container. Some more configuration will be handy, I am sure but this will come later…
One thought on “start of some OSGI adventures”
Hi you might be interested in looking at the Nimble OSGi kernel. It is an OSGi™ framework and Operating System independent shell, scripting environment, dependency resolver and provisioner and makes working with OSGi easier.
Its free to download and use. You can find more info and download it from http://bit.ly/7RPaKs.