Typically, OBR is used by installing the bundle into a running
framework, but I suppose it is possible to use it like you are trying to
do. You will have to make sure to export its classes from the system bundle.
To set the URL to the repository.xml file, you must specify it with
"obr.repository.url" in the configuration properties.
I am not sure what you mean by saying you are trying to provide a
dynamic layer under your application to update its libraries. Your
application has to be built from bundles and installed inside the OSGi
framework to get this to work, is that your plan?
-> richard
On 3/17/09 6:19 PM, Damon Jacobsen wrote:
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]