Scott Lewis wrote:
Are there any viable approaches other than this? e.g. can the wiring
of the RSA (or TopologyManager) bundle be dynamically manipulated...to
allow the RSA or TM itself to register the proxy service factory?
I'm not sure this would work (someone else should confirm) or even be
easier, but I believe you can also bridge your RSA's bundle and the
consumer bundle classloaders together as an alternative to generating
new bundles with imports generated on the fly.
However, the bridging would have to be dynamic to take care of when the
consuming bundle unbinds the service...
There's a nice blog by Todor Boev explaining how it works with sample code:
http://www.infoq.com/articles/code-generation-with-osgi
(and more on his blog)
http://rinswind.blogspot.com/
Once again, it's presented as a solution for extender bundles which have
to bridge their classloaders with the extended bundle, so it's 1:1. In
your situation, it's 1:n (because you want your RSA bundle to proxy m
services coming from n different bundles) so I'm not sure it would work.
But it might be an interesting path to follow.
Or maybe someone will reply and tell me that this would not work at all :-)
HTH,
--
Simon
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev