It is possible to migrate a spring based application to OSGi but do not underestimate the effort.
For old spring applications plain blueprint might be a good alternative as it is very similar to spring xml. In a modern spring application you use a lot of annotations though. For this case you can take a look at the blueprint-maven-plugin ( http://aries.apache.org/modules/blueprint-maven-plugin.html). It parses spring or jee annotations at build time and creates the blueprint xml on the fly. I helped migrate a mid sized spring application to apache karaf this way. Stay away from spring-dm though it is not maintained since ages. You can embed OSGi into an existing application but it will make a lot of things only much harder. So I am not sure if this is a good idea. What we did for the migration was to use the blueprint-maven-plugin above to create blueprint while still keeping the spring contexts. This way we were able to use the same jars in plain spring and OSGi. This is a bit tricky to do but can help you if you do not have time to stop development and just do the migration. In any case keep in mind that OSGi requires good modularization of your existing app. If you have nice modules as jars and each module only uses a designated API to talk to other jars then you will have fun with OSGi. If your beans use other impl classes directly then it can be a pain to bring this to OSGi as is. So the first step should be to have clean module boundaries in plain spring and ideally check them using an architecture tool. If this is in place then migration to OSGi is rather easy. ... and if at some point you decide you do not need /want OSGi you at least have improved your application a lot already :-) Christian 2018-02-15 2:29 GMT+01:00 kentsang77 <kentsan...@gmail.com>: > Hi all, > > I am new to apache feilx and tried the dictionary, spell checker and draw > shape tutorials. > > I have a very large spring base backend application. There are around 500 > spring beans inside. > > They are mainly service handlers, DAOs and some beans for business logic. > > Server > -> Dispatcher (routing requests to handler) > -> Service Handler (handle the request and reply response) > -> DAOs (database insert / update / delete) / business logic beans > > Most service handlers have DAO / business logic bean injected. DAO and > business logic beans are shared by many service handlers as singleton bean. > > Now I want to restructure some handlers as osgi bundles and the Server act > as a osgi host. > > Is apache felix an appropriate framework for spring bean + osgi bundle? Any > example on integrating spring base application with apache felix? > > Regards, > Ken > > > > -- > Sent from: http://apache-felix.18485.x6.nabble.com/Apache-Felix-Users- > f4833200.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > > -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com