Richard,
Using that page as a reference, I tried this:
Felix felix = new Felix(configMap);
felix.start();
BundleContext bundleContext = felix.getBundleContext();
RepositoryAdmin admin = new RepositoryAdminImpl(bundleContext,null);
Resolver resolver = admin.resolver();
for (Resource resource : admin.discoverResources("*"))
System.out.println(resource.getId());
I am trying to start really simple, but this code returns an NPE. Should I
be using the Felix BundleContext? How do I spcify the configuration xml to
the Felix context? Is this the proper way to discover resources? I am trying
to provide a dynamic layer under my application so that I may update
libraries on the fly, but I don't seem to be getting how this all works.
Damon
On Tue, Mar 17, 2009 at 2:31 PM, Richard S. Hall <[email protected]>wrote:
> I am not sure how much documentation is available. You can search for the
> original RFC 112, which Peter Kriens made available from one of his blogs.
> There is our web page on our impl:
>
> http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html
>
> The approach is fairly simple. You populate the OBR repo using a URL to a
> repository.xml file. You can then use the OBR service interface to discover
> available bundles. You can tell OBR which bundles you are interested in
> using the Resolver interface, then it will resolve their transitive
> dependencies and deploy them for you into your running framework.
>
> That's about it.
>
> -> richard
>
>
> On 3/17/09 4:16 PM, Damon Jacobsen wrote:
>
>> I sent an email earlier trying to figure out some basics. I think I have
>> gotten some sort of embedded Felix framework running. I am trying to
>> figure
>> out how to discover and activate bundles using OBR. I am assuming that it
>> works similar to Maven in the sense that there is some ways to say I am
>> looking for artifact X at revision Y and OBR will resolve it and load my
>> bundle. Are there any good articles for using OBR, possibly within an
>> embedded context? Any help would be appreciated.
>>
>> Damon Jacobsen
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>