On Fri, May 20, 2011 at 8:57 PM, Ryan Stewart <rds6235_at_gmail.com> wrote:
> I was sitting here thinking about it, and I think a fix--maybe not the best
> solution, but still a fix--might be to take that isRootResourceClass method
> and make it somehow use a pluggable strategy for loading the Path class. The
> default behavior can be just like it is now, but then I could write a custom
> strategy that would use the correct bundle classloader to load the class,
> thereby making it correctly detect the root resource classes. I expect it
> wouldn't be just this one place, though. The same sort of thing would need
> to be done anywhere that any annotation is used. It might be a pretty
> invasive change. It has also occurred to me that this would be a common
> problem to any kind of annotation-scanning that takes place in an OSGi
> container. I'm not sure what to make of that...
>
And after all that, I realize that it's just a problem with my OSGi bundles.
Different versions of the JAX-RS annotations are being exported and
consequently imported by different bundles, and it's screwing things up.
Once I straighten that out, I think everything will work.