felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls" <karlpa...@gmail.com>
Subject Re: Bundle classloaders and annotations
Date Wed, 11 Jul 2007 08:24:35 GMT
Does bundleA import the package containing annotationB?



On 7/11/07, Rajini Sivaram <rajinisivaram@googlemail.com> wrote:
> Hello,
> I have a question related to annotations which is not specific to Felix, but
> related to OSGi bundle classloaders. I imagine someone on this list will
> know the answer, so I thought this is as good a place as any to ask the
> question.
> I would like to start using SCA annotations inside classes used in an OSGi
> bundle. I have a bundle containing SCA annotations, and other bundles which
> wish to use SCA annotations import the annotations package. So I have classA
> loaded from bundleA which uses annotationB from bundleB. When I call
> classA.getAnnotations(), I get an TypeNotPresentException for annotationB
> since classA's classloader cannot see annotationB. It looks like a
> reasonable exception since classA and annotationB belong to different
> classloader hierarchies.
> Is there any way a bundle can use annotations defined in another bundle?
> Thank you...
> Regards,
> Rajini

Karl Pauls

View raw message