On Nov 29, 2006, at 7:05 PM, Steven E. Harris wrote:
Richard S. Hall <[EMAIL PROTECTED]> writes:
I think everything is there to do what you want.
Except for the missing entry point: creating a Resource. Plenty of
OBR methods return Resources, but creating one from a Bundle is not an
available operation -- at least publicly.
The general approach I could imagine is to convert the manifest of the
locally installed bundle into a Resource (this is what the OBR impl
does when dealing with local bundles too)
Are you thinking of the work done in the
org.apache.felix.bundlerepository.
LocalRepositoryImpl.
LocalResourceImpl.initialize()
method? Obviously that's all Felix-specific, though there is a call
path there that is at least public:
new LocalRepositoryImpl.LocalResourceImpl( bundle );
Seems like you just need to try it and see where we run into
difficulty and then we can improve the OBR impl as necessary.
I'll try using LocalResourceImpl, but it would be nice if there was a
blessed, non-Felix-specific, OBR interface-based way to achieve the
same goal.
Please let me know if you discover an alternate approach I should try
first.
You seem to like to accuse things of being Felix-specific. ;-)
I will try to look into it, but the approach should work on non-Felix
frameworks. Just copy how OBR creates a local resource and put that
code into your own project...it is open source after all. :-)
I will try to spend some time thinking about the best way to support
this...at a minimum, Felix' OBR impl could just export a simple utility
package and expose a class for doing it. At worst, this approach would
be Felix OBR impl specific...
-> richard