Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 14111 invoked from network); 14 Jun 2010 15:38:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jun 2010 15:38:07 -0000 Received: (qmail 22680 invoked by uid 500); 14 Jun 2010 10:11:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 22417 invoked by uid 500); 14 Jun 2010 10:11: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 Received: (qmail 22409 invoked by uid 99); 14 Jun 2010 10:11:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 10:11:23 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jun 2010 10:11:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OO6d7-0002ge-N3 for users@camel.apache.org; Mon, 14 Jun 2010 03:10:57 -0700 Message-ID: <28877793.post@talk.nabble.com> Date: Mon, 14 Jun 2010 03:10:57 -0700 (PDT) From: ankelee To: users@camel.apache.org Subject: Re: Direct-route not shared across contexts? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: andreasasmuss@gmail.com References: <28766143.post@talk.nabble.com> <4C079197.8020105@progress.com> <4C079366.50900@progress.com> <28766770.post@talk.nabble.com> <28768147.post@talk.nabble.com> Hi I think the problem lies in the way I import a routeContext in both my .xml files. The import is not done in the camelContext tag and therefore the two contexts might be sharing the routedefinition? Obviously this setup is the same as doing to imports of the same xml in a row which shouldn't really do anything. Can I somehow either do two instances of the imported route, or have an instance in a CamelContext or something? regres-camelcontext.xml: ... opsig-camelcontext.xml: ... Also I can see that only the first context+route is working when doing it that way. If I load the two contexts in completely seperate containers it works as intended: public static void main(String[] args) throws Exception { Main camelMain = new Main(); camelMain.setApplicationContextUri("regres-camelcontext.xml"); camelMain.enableHangupSupport(); camelMain.start(); Main camelMain2 = new Main(); camelMain2.setApplicationContextUri("opsig-camelcontext.xml"); camelMain2.enableHangupSupport(); camelMain2.start(); } Claus Ibsen-2 wrote: > > Hi > > I have created unit tests in both pure Java and with Spring XML and > cannot reproduce any such behavior > http://svn.apache.org/viewvc?rev=951088&view=rev > > Direct endpoints with same endpoint uri is not shared between multiple > CamelContext. > > So double check on your end what you may do wrong or what you do > differently. > > On Thu, Jun 3, 2010 at 4:20 PM, ankelee wrote: >> >> Hi >> >> >> Running on Windows in JVM 1.6. >> >> I'm just loading it into a Spring container in Java main: >> >> private static String fileRessource = "isuite-client-context.xml"; >> >> ClassPathXmlApplicationContext x = new >> ClassPathXmlApplicationContext(fileRessource); >> >> >> >> >> >> Claus Ibsen-2 wrote: >>> >>> Hi >>> >>> Whats your runtime environment? >>> And how do you start your app? >>> Do you use OSGi or WAR etc? >>> >>> >>> >>> >>> On Thu, Jun 3, 2010 at 2:28 PM, ankelee wrote: >>>> >>>> Perhaps I'm doing it wrong. >>>> >>>> I load a Spring context xml file that has two imports as such. >>>> >>>> >>>> >>>> >>>> >>>> The two camelcontext.xml files obviously holds a tag >>>> each. >>>> >>>> Each of contexts loads a identical route that they create their own >>>> instance >>>> of. These are configured differently with properties. Then I get a >>>> "direct >>>> endpoint cannot have more than 1 active consumer" when I run them at >>>> the >>>> same time. Maybe I don't really have two camelcontexts or? >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Direct-route-not-shared-across-contexts--tp28766143p28766770.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Direct-route-not-shared-across-contexts--tp28766143p28768147.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > > -- View this message in context: http://old.nabble.com/Direct-route-not-shared-across-contexts--tp28766143p28877793.html Sent from the Camel - Users mailing list archive at Nabble.com.