Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 97344 invoked from network); 30 Jun 2010 08:37:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jun 2010 08:37:09 -0000 Received: (qmail 9986 invoked by uid 500); 30 Jun 2010 08:37:09 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 9896 invoked by uid 500); 30 Jun 2010 08:37:08 -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 9888 invoked by uid 99); 30 Jun 2010 08:37:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 08:37:07 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.strachan@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2010 08:37:01 +0000 Received: by fg-out-1718.google.com with SMTP id 16so42955fgg.2 for ; Wed, 30 Jun 2010 01:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=/lm6CngqhJZTmOKnIAv6TQy/s9ErMqfeZL25wv68Iqk=; b=fHiNZAcOXmwqcQQPnA6NQB45vu/NXy/KiJ9J4tt+Vaz6+iLhY9tG7rjxDO8wV6XSYX cNE9EYirm44EzgEw6I0VZDAMx0oYWwW7klWejHt5UcfcoTgzsGk3oQVD82sh34UxIjKF OA6sRASXDqJ9fmfMVWppHyQ+ILkkG7OoSOfcc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=qsZfjjLEpqR3o6qrkAx8vrqiJwUNkQBeAm/4v2IOYmnsJYFxJ5A8U0L2MUV09UzLgP XKsD5s1iPMFI2kvJcIbo3vcYIiG5GeM0hc6od1I53NTcnwq8pPRu1f4A4pyCBssCqMbR MoRzeXkntMH7nZWBz74iLcdKOoySg/YvUpFMk= Received: by 10.239.191.142 with SMTP id b14mr513770hbi.148.1277886952129; Wed, 30 Jun 2010 01:35:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.148.203 with HTTP; Wed, 30 Jun 2010 01:35:32 -0700 (PDT) In-Reply-To: <4C2B0127.8070001@progress.com> References: <1277886296374-512038.post@n5.nabble.com> <4C2B0127.8070001@progress.com> From: James Strachan Date: Wed, 30 Jun 2010 09:35:32 +0100 Message-ID: Subject: Re: Multiple Camel Contexts - why? To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 30 June 2010 09:32, Adrian Trenaman wrote: > Hi Gallapagus, > > In general, you don't tend to want multiple camel contexts in your > application, if you're running Camel as a standalone Java instance. However, > if you're deploying Camel routes as OSGi bundles, or WARs in an application > server, then you can end up having multiple routes being deployed, each in > it's own, isolated camel context, in the same JVM. This makes sense: you > want each Camel application to be deployable in isolation, in it's own > Application Context, and not affected by the other Camel applications. > > If you want the endpoints or producers in different camel contexts to > communicate with another, there are a number of solutions. You can use the > ServiceMix NMR, or you can use JMS, or you can use Camel's vm transport. Agreed - one minor nit - the vm transport, only works if Camel is on a shared class loader across deployment units. So that won't work in WARs unless camel is on your system classpath & will only work in OSGi if you are reusing the same version of camel across your bundles. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/