Thanks JB, I actually already have my own Karaf distribution (sorry for being unclear on that point) so I was mostly interested in the wrapping part.
Do you know if there are any nice examples of using the org.apache.karaf.main.Main class (maybe Main.main() is the best one)? Regarding PaxExam Karaf, I am already using it for integration tests. I'm just wondering if that project supports running Karaf outside of a JUnit context similar to the following PaxExam example: https://github.com/tonit/Learn-PaxExam/blob/master/lesson-servermode/src/main/java/org/ops4j/pax/exam/servermode/SimpleServer.java best regards, Peter On Tue, Mar 6, 2012 at 2:37 PM, Jean-Baptiste Onofré <[email protected]>wrote: > Hi Peter, > > I would create my own distribution of Karaf. > > If you want to hide/wrap it in your application, Main could be a way to > achieve that. > > Pax-Exam-Karaf is designed more for the itests. > > Regards > JB > > > On 03/06/2012 02:27 PM, peterg wrote: > >> Hi all, >> >> what would be the easiest way to embed a Karaf instance within an existing >> Java application? >> - using/deriving from org.apache.karaf.main.Main? >> - using PaxExam Karaf? >> - something else...? >> >> Ideally, I would like to just start an instance of my own Karaf >> distribution >> (available as a Maven artifact in my own repository) and interact with it >> (accessing/invoking bundles and services, for example). >> >> best regards, Peter >> >> -- >> View this message in context: http://karaf.922171.n3.nabble.** >> com/Embedding-Karaf-in-a-Java-**application-tp3803560p3803560.**html<http://karaf.922171.n3.nabble.com/Embedding-Karaf-in-a-Java-application-tp3803560p3803560.html> >> Sent from the Karaf - User mailing list archive at Nabble.com. >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com >
