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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:31:24+00:00 2026-06-05T10:31:24+00:00

We have to support at least 2 versions of functionality at the same time.

  • 0

We have to support at least 2 versions of functionality at the same time. It can be in the web side or services, meaning we’ll have different layout for different users in the web or service implementation will be different for different users. We should be able to route the users based on their login to the right version of the web application / bundle.

We thought of something like this (please see bigger picture here https://i.stack.imgur.com/6NxhF.png).

enter image description here

Also is it possible to have multiple web applications / bundles deployed as one EBA? If yes, is it possible to share the session between these web apps / bundles? As we are new to OSGi, looking forward to any suggestion on the design we have chosen. Appreciate any help / suggestions on this.

Thanks,

Bab.

  • 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-05T10:31:27+00:00Added an answer on June 5, 2026 at 10:31 am

    Yes, OSGi can help you a lot with this.

    The architecture you have chosen looks fine, I would suggest perhaps also adding a ‘SessionManager’ as suggested by Christian.

    Regarding the OSGi specifics you will need for this:

    If you have two different versions of the “Services” bundle, which are packaged in the same Java packages, you should definitely define package versions when exporting them in the manifests:

    In Services V1:

    Export-Package: com.acme.foo;version="1.24"
    

    and in Services V2

    Export-Package: com.acme.foo;version="2.3"
    

    You can then control which package is imported in the Web bundles by defining restrictions, e.g. like this for whole intervals:

    Import-Package: com.acme.foo;version="[1.23, 2)"
    

    The beauty of this is that due to the modularity of OSGi and the separate classloaders of the bundles both versions of com.acme.foo can be installed and used in the same system. You cannot achieve this in the “usual” Java setup, because there there is only one classloader and one version of the package will shadow the other.

    You can see OSGi demos and examples for example here

    This was about the packages and libraries.
    Now about the actual service objects:

    You could also have two versions of the same service published in the OSGi Service Registry. The easiest way to differentiate between the two is to use service properties when registering the service:

    Hashtable properties = new Hashtable();
    properties.put( "service_flavour",
    "advanced" );
    context.registerService(
    SomeService.class.getName(),
    this, properties );
    

    You can then use the props to lookup the correct service in the Web bundles:

    ServiceTracker someServiceTracker = new ServiceTracker(bc, "(&(objectclass="+SomeService.class.getName()+")(service_flavour=advanced))", null);
    someServiceTracker.open();
    

    Regarding your question about EBA – I am not sure what you mean. You can install as many bundles as you want in any OSGi framework, and they can all register under different aliases in the OSGi HTTP service. As long as the aliases don’t have a conflict with each other it is ok. You can also have one main servlet if you want, and distribute the handling of the different pages to other bundles without registering them as servlets too – your main web servlet could look them up in the OSGi service registry for example, and distribute the work. It all depends whether you expect more application logic/calculations etc, or is it more about formatting and representation of some existing data.

    Hope this helps.

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

Sidebar

Related Questions

PowerBuilder seems to have some support for plug-ins since version 10. However, I can't
The DevExpress products have always provided good support for persisting users' preferences. My DevExpress
In other words, can't the versions have conflicts and is there a way to
Does emacs have support for big numbers that don't fit in integers? If it
Which browsers have support for CSS :before { content: x; }? I could not
I know that OpenCL doesn't have support for complex numbers, and by what I've
I have checked IE8, FF 3.5 , Opera 9 none of them have support
I know IE7 & IE8 supposedly have support for using multiple CSS class selectors,
I have a support environment where we connect to many of our customers' systems
Does gwt have (good) support for effects, moving around elements, and resizing them? Are

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.