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 E864B115E0 for ; Fri, 16 May 2014 15:16:01 +0000 (UTC) Received: (qmail 11827 invoked by uid 500); 16 May 2014 11:52:07 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 15901 invoked by uid 500); 16 May 2014 11:42:24 -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 Delivered-To: moderator for users@camel.apache.org Received: (qmail 45839 invoked by uid 99); 15 May 2014 02:05:24 -0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Date: Wed, 14 May 2014 19:04:41 -0700 (PDT) From: techybolek To: users@camel.apache.org Message-ID: <1400119481827-5751145.post@n5.nabble.com> Subject: Camel OSGI: how do I get the spring application context? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Below is a snippet from the camle-osgi example. I can obtain the camel context but how do I get the original spring application context? Or how am I supposed to get a reference to "mybean"? MyRouteBuilder.java: public class MyRouteBuilder extends RouteBuilder { public static void main(String[] args) throws Exception{ new Main().run(args); } public void configure() { // set up the transform bean ModelCamelContext mc = getContext();//ok, I can get the camel context fine //but how to get the spring context to get to "mybean"??? //set up routes } } beans.xml: org.apache.servicemix.examples.camel ----- -- View this message in context: http://camel.465427.n5.nabble.com/Camel-OSGI-how-do-I-get-the-spring-application-context-tp5751145.html Sent from the Camel - Users mailing list archive at Nabble.com.