Recently we are trying to implement multitenancy using OSGi framework... am unable to proceed, how to start multi tenancy using OSGi? Can anyone post related information for developing multi tenancy...
Until recently OSGi did not have an official answer to that, but that changed with the 'subsystems' specification in OSGi 5.
David Bosschaert wrote a nice article about it:
Mind you, this stuff is far from mainstream yet, so you might run into some early adopter problems, if you are on a tight schedule I'd advise against it.
Alternatively, you could look at:
By far the easiest solution is to just start a framework per instance. OSGi is NOT an app server and trying to (ab)use it like a general app server means you do not the the idea behind OSGi. OSGi is a way to organize an application so you can build (large) apps out of reusable components.
In general I agree with Peter about the fact that in many cases just starting multiple frameworks is by far the easiest way. There are some downsides however (mostly in the area of deployment).
The Amdatu project has a way to use multi tenancy at the OSGi services level. You can basically modify an existing bundle to become multi tenant without any actual code changes. Documentation can be found on the website: https://amdatu.org/application/multitenancy/