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 8860339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:14:51+00:00 2026-06-14T15:14:51+00:00

I need to wait some time before shut down my OSGI context.( Give some

  • 0

I need to wait some time before shut down my OSGI context.( Give some time to finish the tasks that are currently running). I came across with shutdown.wait.time property in the extenderProperties bean.

Can anyone please let me know how can I use this OSGi fragments to achieve my goal? I think I can attach a fragment bundle to my existing OSGI bundle.

Thanks in advance. appreciate your help.

  • 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-14T15:14:52+00:00Added an answer on June 14, 2026 at 3:14 pm

    You’ll need to create a bundle with two files in it: META-INF/MANIFEST.MF and META-INF/spring/extender/extender.xml (the xml file could be named anything with an xml extension, but must be in the META-INF/spring/extender folder). Your MANIFEST.MF file will need to contain the OSGi manifest header Fragment-Host of org.springframework.osgi.extender. If you’re using the maven-bundle-plugin, your plugin configuration would look something like this:

    ...
    <plugin>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <version>2.3.5</version>
      <extensions>true</extensions>
      <configuration>
        <instructions>
          <Fragment-Host>org.springframework.osgi.extender</Fragment-Host>
        </instructions>
      </configuration>
    </plugin>
    ...
    

    Your extender.xml file will need to define a java.util.Properties bean with a name of extenderProperties. It should contain a property named shutdown.wait.time with a value in milliseconds (eg. 30000 for 30 seconds). The file may look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:util="http://www.springframework.org/schema/util"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context     http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/util     http://www.springframework.org/schema/util/spring-util-3.0.xsd">
      <util:properties id="extenderProperties">
        <prop key="shutdown.wait.time">30000</prop>
      </util:properties>
    </beans>
    

    Then deploy the bundle into your environment. You may need to restart the Spring OSGi bundles (or your server) depending on the order this fragment bundle is installed in relation to the Spring DM bundles.

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

Sidebar

Related Questions

I'm developing a game, that is running in a separate thread. Now I need
I currently have an application where I create a series of Tasks that execute
I need to wait for an input for 20 seconds, after that myscript should
I need to wait for some events in my application, or wait for somew
I have a program where I need to do some initial work before calling
I am doing a media file scan using sendBroadcast. Then I need to wait
I need a way to wait until a (Swing) JComponent is fully painted. This
I need files to be downloaded to /tmp/cron_test/. My wget code is wget --random-wait
I need to run two ffmpeg commands, one after the other i.e., wait until
I have a php script I need to run every 5 seconds (run, wait

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.