Jeremias Maerki-2 wrote:
> 
> On 10.11.2009 18:26:37 lukewpatterson wrote:
>> 
>> In my activator, I'm bundletracking looking for /META-INF/services
>> folders. 
>> I wrap around the service-providing bundles with a custom ClassLoader and
>> then register them with my API's service factory.
>> 
>> This approach seems to work fine except when the /META-INF/services are
>> provided exclusively from the Bundle-ClassPath entries.  i.e. doesn't
>> work
>> when no /META-INF/services folder on root, but embedded jars on the
>> Bundle-ClassPath have the folder
>> 
>> Is Bundle.findEntries(...) [1] supposed to look on the Bundle-Classpath?
> 
> Are you trying to solve the same problem as I've done lately?
> See: http://www.jeremias-maerki.ch/development/osgi/jar-services.html
> Well, I didn't specifically look into the Bundle-Classpath issue in this
> context. I've turned the META-INF/services carrying JARs into full OSGi
> bundles.
> 

Yes Jeremias, I think what you've done is very close to what I'm looking
for.  I think the restlet team is doing something kinda like this too [1].

I'm working with other teams which use jar SPI (they are kind enough to make
their stuff bundles, but don't care about OSGi beyond that point), and I
want a generic way of loading impls.  The dynamism obviously wouldn't be
there, so I was thinking that the appropriate level of bundle state required
would merely be INSTALLED.

I started reading through your code and documentation.  I was wondering if
it handles all the scenarios where a bundle can be updated, installed,
uninstalled.

I was hoping to accomplish this generic lookup without requiring a special
manifest header, but I see how that introduces all sorts of complexities for
the implementation (even with BundleTracker and PackageAdmin).

[1] http://n2.nabble.com/OSGi-vs-Service-Provider-patterns-td2478338.html
and
http://restlet.tigris.org/source/browse/restlet/trunk/modules/org.restlet/src/org/restlet/engine/internal/Activator.java?view=markup
and 
-- 
View this message in context: 
http://old.nabble.com/Bundle.findEntries%28...%29-and-Bundle-Classpath-tp26287340p26302990.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to