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

  • Home
  • SEARCH
  • 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 7566729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:29:16+00:00 2026-05-30T14:29:16+00:00

We are running Apache ServiceMix 4 ESB which runs an Apache Karaf container based

  • 0

We are running Apache ServiceMix 4 ESB which runs an Apache Karaf container based on OSGi. OSGi offers facilities, which are exposed in the ServiceMix console, that report information on the state of bundles installed in the container:

osgi:list

I’ve searched high and low. Now I’m asking: Does anyone know of any working examples, guides on using the API or other guidance in accessing this information from within code running in the ESB? Ideally, I would like to:

  1. Identify which bundles are installed;
  2. Monitor the state of the identified bundle; and, at least,
  3. Dynamically stop/uninstall and start/re-install the identified bundle,

Please share any information available on this, or just any avenues from which to start better researching it.

Thanks.

  • 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-05-30T14:29:17+00:00Added an answer on May 30, 2026 at 2:29 pm

    Blueprint is of limited use for this, since Blueprint is by definition declarative and you want to do something programatically. However, Blueprint can set you on your way by injecting a bundle context. Once you have a bundle context you can use the org.osgi.framework APIs to get all the bundles (context.getBundles()), query their state, start and stop them, and so on.

    Your requirement 3), loading a bundle, doesn’t really make sense in an OSGi context, since their lifecycle is that they get installed and then started. If a bundle hasn’t been installed it won’t be included in getBundles(), but it can be installed using the context.

    To inject the context into a Blueprint bean, use a special property:

    <bean class="SomeClass">
        <property name="context" ref="blueprintBundleContext"/>
    </bean>
    

    I’ve borrowed that example from Enterprise OSGi in Action, but there’s a very good Blueprint tutorial on developerWorks: http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/

    A similar question was asked recently, which you may also find useful: How should I implement the OSGi console into a Bundle? (ss is similar to bundle:list, although it doesn’t give any Blueprint-specific information).

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

Sidebar

Related Questions

I have a script which uploads data to my web server running Apache/PHP 5.3,
I'm running Apache 2.2 in console mode on Windows to test an apache module
Im running a Apache Webserver under Windows Sever 2003. I noticed that my logfile
I'm running Apache Derby server on Eclipse EE. My issue is that whenever I
I have an Ubuntu 10.04 server running Apache with phusion passenger that I've been
I currently have an internal website that is running Apache. It is serving some
When running Apache Jackrabbit JCR as an embedded service in your app, is there
On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts
I have been running Apache HTTPD in 64bit mode by stripping out the 32bit
I'm running Apache on Windows XP via Xampplite, and could use help configuring my

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.