Stuart McCulloch wrote:
On 25/03/2008, Tim Moloney <[EMAIL PROTECTED]> wrote:
I have created a simple bundle that uses org.apache.felix.log and
org.apache.felix.eventadmin. Although I build against
org.osgi.compendium (for the interface definitions), I can run without
it. I just started using org.apache.felix.wireadmin in my bundle and it
requires compendium to be running in the framework.
- Should org.osgi.compendium be running in the framework to run
org.apache.felix.wireadmin?
the wireadmin bundle needs the wireadmin service API
which is provided by the compendium bundle - I guess
it could embed this API for convenience (and then both
import and export it, in case the compendium bundle is
already loaded) but I don't think the spec mandates this
Wouldn't it make sense that a bundle that implements a service, export
that interface? I think that org.apache.felix.log and
org.apache.felix.eventadmin both do this.
so currently it needs the compendium bundle - or rather
any bundle that exports the wireadmin service package
I guess that I could always load the compendium bundle so that I have
the API. Unfortunately, the compendium requires javax.servlet so I'll
have to load that also even though I don't use it.
btw, you may find your bundle can run fine without the
compendium bundle if it doesn't get round to invoking
code that needs the API (or if it happens to embed it)
Would it be a good idea for my bundle to include (as private packages)
any interfaces it uses? This way, my bundle won't have any failed
dependencies. I can then gracefully handle any missing services rather
than failing to load.
- I list org.apache.felix.log, org.apache.felix.eventadmin, and
org.apache.felix.wireadmin as runtime dependencies for my bundle but
this doesn't appear to be necessary. What's "best practice" for this?
you mean in maven?
Oops, yes, in Maven.
I typically only add the bundles
needed to compile against in the actual bundle pom
(a lot of the time just core+compendium)
I understand this part.
and list the
provisioned bundles separately with 'provided' scope
in another deployment file/pom
I don't understand this. Can you elaborate?
- Both org.apache.felix.log and org.apache.felix.wireadmin are at
version 0.9.0-SNAPSHOT. Will they be released as 1.0.0 anytime soon?
that's certainly the goal, but I can't give a firm date...
Thanks,
Tim
--
Cheers, Stuart
Thanks,
Tim