Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3428E10854 for ; Fri, 17 Jan 2014 07:46:52 +0000 (UTC) Received: (qmail 95941 invoked by uid 500); 17 Jan 2014 07:45:24 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 95006 invoked by uid 500); 17 Jan 2014 07:44:27 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 90969 invoked by uid 99); 17 Jan 2014 07:41:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 07:41:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.213.181 as permitted sender) Received: from [209.85.213.181] (HELO mail-ig0-f181.google.com) (209.85.213.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 07:41:06 +0000 Received: by mail-ig0-f181.google.com with SMTP id j1so892842iga.2 for ; Thu, 16 Jan 2014 23:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=e2UmG1pRQUKOsen5Skq2w7RD0pfYlrGkv74QA47T2W8=; b=es6Dssky1nXW/BhwSL5+kHaiCzg31kVl+FjPfNz2MG16J+rNba8pzybLWsInJgDcj4 IA36nNhFFh3x1b6vAldgkW2HpisVs9RgMY2R+GmvR9zJ8L29ITGpIt3jkipRV5k3gFBY L2/RiOPniW0NbMICymzWrY/4MupcBdurLKi2AwvMMpAFEQNF19mas4fn0e2xRL6uDM30 Mnrb7JkqFgu4eywmWzaZxMqQ3GoZqhu8h1Zb7BlCA2QPqJSYcdV4sXp4zkXiIwgeNEDL ElTbWKhjtB/XIlvU6QpQXPOBn6s+nNmY0fOINgrDWUa3uxsyX4NglbvRwBBgU3KTYBw7 VR9w== X-Received: by 10.43.103.137 with SMTP id di9mr278697icc.19.1389944445293; Thu, 16 Jan 2014 23:40:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.133.72 with HTTP; Thu, 16 Jan 2014 23:40:24 -0800 (PST) In-Reply-To: References: From: Claus Ibsen Date: Fri, 17 Jan 2014 08:40:24 +0100 Message-ID: Subject: Re: Camel main class in osgi bundle To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Using a spring or blueprint xml file to bootstrap Camel is often much easier, as it does all the OSGi lifecycle and other pieces you otherwise must do yourself. If you dont want to do that, then you need to use an osgi activator to call some code, that creates a OsgiCamelContext and setup a bunch of stuff to make it run in OSGi. And as well stop and cleanup these services again when the bundle stops. Though much easier to just have a little OSGI-INF/blueprint/somenamehere.xml blueprint xml file that embeds a and you have Camel running. On Fri, Jan 17, 2014 at 4:48 AM, Muhzin wrote: > Hi all, > I am trying to run camel application in karaf. I new to programming for > osgi. How can I make my camel routes run in it? Can i put it in a normal > main() class and run it? > > -- > BR > Muhsin -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io