Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » ServiceLoader<?> and OSGi bundles - does OSGi bypass the internal ServiceLoader<?> code?
ServiceLoader<?> and OSGi bundles - does OSGi bypass the internal ServiceLoader<?> code? [message #87046] Thu, 19 April 2007 23:20
No real name is currently offline No real nameFriend
Messages: 113
Registered: July 2009
Senior Member
I need to create a jar file that can run under OSGi as well as a
non-OSGi framework. The jar file provides some services whether OSGi or
non-OSGi.

A reference to an earlier email around this subject is:

http://osdir.com/ml/ide.eclipse.equinox.devel/2007-01/msg000 39.html

it suggests that ServiceLoader<?> can be used with OSGi services thereby
allowing me to build both OSGi and ServiceLoader<?> service
initialization capabilities into the same jar. This would allow me to
enable both service approaches depending on the application.

I tried to build a jar file that is an OSGi bundle with a
ServiceLoader<?> access step (the programmatic approach) in one of my
classes but found as an OSGi bundle, the ServiceLoader<?> is not
returning my sevices as documented in J2SE 1.6 descriptions.

Does OSGi bypass or disable the ServiceLoader<?> capability?


The use of the META.MF/services approach is mentioned in section 702 of
the OSGi comp. document.
Previous Topic:Jetty Port
Next Topic:restart osgi runtime
Goto Forum:
  


Current Time: Fri Apr 26 20:06:38 GMT 2024

Powered by FUDForum. Page generated in 0.03096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top