Hi well this is a special deployer that helps you if you develop "small" spring applications that are capable of just beeing runnable through some basic classes available through spring. How does it work, it takes the deployed spring.xml file and wrapps a bundle around it with a dynamic-import. One can use those for example to provide a datasource as osgi service. (but i tend to use blueprint for that) So for you I'd say you are probably more set with your spring jar depending on the spring-dm features.
regards, Achim 2012/8/10 Julien Martin <[email protected]>: > I would be very grateful for some clarification about the following: > > "Karaf includes a deployer that is able to deploy plain blueprint or > spring-dm configuration files. > The deployer will transform on the fly any spring configuration file dropped > into the deploy folder into a valid OSGi bundle." > > I am not sure what is meant by "spring-dm configuration file"... > > What I have now is a jar (non-osgi) that contains a > META-INF/spring/mySpringConfig.xml plus the relevant java classe; all > dependencies/jars including the spring-dm 1.2.1. > > How am I supposed to package all that so that the karaf feature described > above applies? > > Regards, > > Julien. > > 2012/8/9 Julien Martin <[email protected]> >> >> thanks Achim >> >> >> 2012/8/9 Achim Nierbeck <[email protected]> >>> >>> Hi >>> >>> well if you have placed your spring-application.xml in the right >>> directory of your bundle it'll start right away. >>> This should be something like /META-INF/spring/. >>> If you want to consume other services take a look at the spring-dm >>> documentation on how to reference those. >>> >>> something similar to <reference interface="x.y.z"> will give you a >>> bean to this service. >>> >>> Regards, Achim >>> >>> >>> 2012/8/9 Julien Martin <[email protected]>: >>> > Thanks Achim, >>> > 1. I have successfully installed the spring-dm feature. >>> > 2. I will next package my app as a Spring DM app. >>> > 3. What do I do after 2. in order to deploy and manage my app with >>> > Karaf? >>> > Regards, >>> > J. >>> > >>> > >>> > 2012/8/9 Achim Nierbeck <[email protected]> >>> >> >>> >> Hi, >>> >> >>> >> for starting spring inside a OSGi container you can use spring-dm [1]. >>> >> For Karaf you just need to install the spring-dm feature and then >>> >> you're >>> >> set. >>> >> As Spring-DM 2.0 is equivalent to blueprint only spring-dm 1.2.1 is >>> >> supported by Karaf right now but this should be sufficient for you. >>> >> >>> >> regards, Achim >>> >> >>> >> [1] - http://static.springsource.org/osgi/docs/1.2.1/reference/html/ >>> >> >>> >> 2012/8/9 Julien Martin <[email protected]>: >>> >> > Hello, >>> >> > >>> >> > I am in the process of developing a Spring app. As it stands the app >>> >> > is >>> >> > currently run as follows by a main class: >>> >> > >>> >> > import >>> >> > org.springframework.context.support.ClassPathXmlApplicationContext; >>> >> > >>> >> > >>> >> > public class Bootstrap { >>> >> > >>> >> > >>> >> > public static void main(String[] args) { >>> >> > >>> >> > new >>> >> > ClassPathXmlApplicationContext("spring-integration-demo.xml"); >>> >> > >>> >> > } >>> >> > >>> >> > >>> >> > } >>> >> > >>> >> > I would like to integrate my app into Apache Karaf (or integrate >>> >> > Apache >>> >> > Karaf into my app?). >>> >> > >>> >> > I am not sure where and how to start. Can someone please provide >>> >> > basic >>> >> > advice and/or pointer to relevant documentation? >>> >> > >>> >> > Thanks in advance, >>> >> > >>> >> > J. >>> >> >>> >> >>> >> >>> >> -- >>> >> >>> >> Apache Karaf <http://karaf.apache.org/> Committer & PMC >>> >> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> >>> >> Committer & Project Lead >>> >> OPS4J Pax for Vaadin >>> >> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project >>> >> Lead >>> >> blog <http://notizblog.nierbeck.de/> >>> > >>> > >>> >>> >>> >>> -- >>> >>> Apache Karaf <http://karaf.apache.org/> Committer & PMC >>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> >>> Committer & Project Lead >>> OPS4J Pax for Vaadin >>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project >>> Lead >>> blog <http://notizblog.nierbeck.de/> >> >> > -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/>
