Well afaik spring itself doesn't care any longer for OSGi and from Spring 4 on it's not supported in any way. It's always been more of a hassle to have it working with OSGi I guess.
That's why there is no real good example for its usage. People usually switch to blueprint, DS or other frameworks. TBH. every now and then I have to use Spring for a project and I regret it every time. 2014-12-04 23:29 GMT+01:00 asookazian2 <[email protected]>: > We have some legacy J2EE apps that we've ported (finally) to Karaf 3.0.x > which use Spring. Mainly for dependency injection and possibly some > templates (e.g. JdbcTemplate, etc.) and AOP. > > Anyways, looks like there are no Spring (or Spring dm?) examples here: > https://github.com/cschneider/Karaf-Tutorial and there are no Spring > examples in the Apache Karaf Cookbook. > > Is Spring usage with OSGi/Karaf recommended or not? If yes, where can I > find some examples? > > "I stopped using spring on OSGi a long time ago." > > > http://stackoverflow.com/questions/24595900/invalid-bundle-when-starting-apache-karaf > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Using-Spring-with-Karaf-3-x-tp4036977.html > Sent from the Karaf - User mailing list archive at Nabble.com. > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
