[rabbitmq-discuss] Patches for rabbitmq-client OSGi integration

Holger Hoffstätte holger at wizards.de
Sun May 17 18:58:38 BST 2009


Hi,

I started to make the java-client lib a proper OSGi bundle so that it can
be installed out of the box..into an OSGi box. :)

A first version is now availabe from my clone at:
http://hoho.dyndns.org/hg/rabbitmq-java-client/

I tried to fold the necessary work into the existing build process as
gently as possible, and while I was at it I also updated the dependencies
to some more recent (known to be good) versions. This was not strictly
necessary but made testing easier, as they already have proper OSGi bundle
information.

Essentially, all it does is add a "bndwrap" task to the ant build, which
is invoked from the "jar" task. This is necessary as I didn't want to
rewrite everything by using bnd directly to create the jar. Other than
that the build process is not impacted.

Two remaining issues I could need feedback with:

- the handling of the library "version" seems scattered across the entire
build process (seriously..make?) and I'm not really sure what to do with
it; the bnd input properties file in the osgi directory has a "version"
line which might need to be updated from whatever hackery the build
process invokes. I'm reluctant to touch any of that. :-(

- the backport retrotranslating is currently not implemented properly; the
resulting bundle does not declare the retrotranslator or
backport-util-concurrent dependencies correctly and therefore very likely
won't resolve correctly in OSGi. Not sure if this is important enough -
the bndwrap process for the retrotranslated jar would have to be fed a
second properties file with updated dependencies. Volunteers welcome ;)

Also maybe someone else familiar with OSGi can look over the generated
bundle and check whether the imports/exports and version ranges are
appropriate.

Let me know what you think!

Holger





More information about the rabbitmq-discuss mailing list