Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8659757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:05:12+00:00 2026-06-12T16:05:12+00:00

Can anyone tell me definitively if a osgi bundle that contains code that calls

  • 0

Can anyone tell me definitively if a osgi bundle that contains code that calls

javax.imageio.spi.ServiceRegistry

to find a service (in META-INF\service) will find that service, if that service implementation is in another bundle.

I’m not finding any documentation that is specific about this. I’m using the felix osgi container. Any pointers would be gratefully received.

I suspect it does work and my problem lies elsewhere as I notice that in the xdocreport osgi bundle fr.opensagres.xdocreport.core, ServiceRegistry gets used here but maybe its not supported on all osgi containers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:05:13+00:00Added an answer on June 12, 2026 at 4:05 pm

    Hi thanks everyone for your answers.
    I think ServiceRegistry will work in an osgi container to instantiate a service but only within the same classloader.
    And that’s facilitated by use of osgi fragments. So as long as the implementer is in a fragment that defines its Fragment-host as the bundle that contains the class that has the ServiceRegistry lookup code, then ServiceRegistry will work.

    This is why it is working in the xdocreport code I linked to.
    In this case the ServiceLoader code is called from an abstract class in fr.opensagres.xdocreport.core (a bundle), which is extended by concrete class in fr.opensagres.xdocreport.document (so the ServiceRegistry call is in fr.opensagres.xdocreport.document). The Service implementation is in fr.opensagres.xdocreport.document.docx. a fragment whose has defined its frament-host as fr.opensagres.xdocreport.document.

    So fr.opensagres.xdocreport.document and fr.opensagres.xdocreport.document.docx use the same class loader…so it works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me why this code would not be working? $('body').on('test', function() {
Can anyone tell me why the following code fails to submit the form into
Can anyone tell me where's my mistake? By using that query, it should return
Does anyone know where to find a list of controls that you can set
Can anyone tell me why this code crashes with SIGABRT unrecognised selector sent to
Can anyone tell the block animation equivalent of this below code snippet? [UIView beginAnimations:@View
I am wondering if anyone can definitively tell me if Flash / AIR can
Can anyone tell me how an IDE like NetBeans or any for that matter
Can anyone tell me please how to convert html code into json obj by
Can anyone tell me what exactly does this Java code do? SecureRandom random =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.