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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:37:26+00:00 2026-05-26T17:37:26+00:00

I have a Java application built with OSGi that I want to run in

  • 0

I have a Java application built with OSGi that I want to run in different modes, say a remote & local data source. I would like to be able to build and deploy a single version so that I could run the app as a service in remote mode and then stop the service & try different things in local mode.

I am using declarative services.

Would there be a way to do this?

# app -remote
Starting app in remote mode
Disabling com.example.data.local.FileStoreDao
Enabling com.example.data.remote.MySqlDao
...

And conversely:

# app -local
Starting app in localmode
Disabling com.example.data.remote.MySqlDao
Enabling com.example.data.local.FileStoreDao
...

Or something similar.

  • 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-26T17:37:26+00:00Added an answer on May 26, 2026 at 5:37 pm

    Not sure what framework you’re using, but in Equinox, you can pass a different config file with a command line swich:

    http://www.eclipse.org/equinox/documents/quickstart-framework.php

    You could have two config files, and have a wrapper (java or batch file?) around the OSGi bootstrapper to select the proper config file. I have done something like this, but in my case I ended up going with two distros with different plugins, as it was simpler and it was all that I needed. Hope this helps

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

Sidebar

Related Questions

I have built a Java application that has some dependencies (~10). I would like
I have built a web application using Java EE platform that sells one of
I have built an application that I want to use as the foundation for
I have a Java Tomcat web application built in IntelliJ that calls code in
I have an application I've built that uses a non-Java executable that it calls
I have a Java application that calls lots of different native methods of a
I have a Java application, built with eclipse, that uses QTJambi. Running the application
I have a java application that stores some GPS data in a strange format:
I have an application that is built in Java that requires authorization. However, the
I have a Java application that launches another java application. The launcher has a

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.