Gaurav Purandare wrote:Few people do not have a good experience working with OSGi for larger projects, with too many layers and too many dependencies
it becomes bit of a hassle trying to figure out the exceptions.
If using OSGi is worth it, with too many knobs and too many levers, would it be useful to convert existing applications to OSGi?
First, I do not necessarily think that OSGi is some golden hammer that must be used on every application. An ounce of pragmatism is in order to decide whether OSGi is a proper fit.
But, I'm not sure I follow your "too many layers and too many dependencies" statement? Are you talking about OSGi or the application you'd consider converting to OSGi? If you're referring to OSGi, then I think you may be mistaken about the supposed complexity of OSGi. The core OSGi specification defines a very small API with only a handful of packages and mostly interfaces with one or two method requirements. Even then, if you develop to the OSGi API, you'll likely only ever use a handful of those interfaces. And, even then, you'd be better off using a declarative OSGi model such as Spring-DM. With Spring-DM, OSGi isn't much harder than wiring beans.
Again, even though I don't follow the "too many knobs and too many levers" argument, I can only answer your final question with a 2-word answer: It depends.
I don't know anything about the application that you'd consider converting. Most applications would benefit from OSGi...but there may be some valid reasons (either technical or non-technical) that might make me decide to leave OSGi out. It depends.
But, should you decide to convert an existing application, be aware that it's very possible to take it piece-meal. You don't have to convert it all in one fell swoop. I have some decent notes on how to do such a conversion and hope to blog about them soon. But if you have any specific questions on converting that I can help you with, please feel free to ask.