Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 12AB1200C23 for ; Wed, 22 Feb 2017 16:42:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 115A0160B67; Wed, 22 Feb 2017 15:42:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 32C02160B49 for ; Wed, 22 Feb 2017 16:42:19 +0100 (CET) Received: (qmail 94224 invoked by uid 500); 22 Feb 2017 15:42:18 -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 94212 invoked by uid 99); 22 Feb 2017 15:42:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 15:42:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 74A79189559 for ; Wed, 22 Feb 2017 15:42:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.693 X-Spam-Level: * X-Spam-Status: No, score=1.693 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GSJ0nmnTdXGh for ; Wed, 22 Feb 2017 15:42:16 +0000 (UTC) Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DDC045F1EE for ; Wed, 22 Feb 2017 15:42:15 +0000 (UTC) Received: by mail-qk0-f169.google.com with SMTP id u188so6157270qkc.2 for ; Wed, 22 Feb 2017 07:42:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=GTdGRgPIigqhCym2EWisOZPEsTKxXX4M6j+43YRLjYw=; b=TYcpzrFdLEWEtqXffghhuxOFvZOhrcTxa3PDX+4jHgbffGznpnhfpLPBCPte1dGG9o 7IeljLCRf3I+yRUZYKrGN5ETvVG5LSn6DCl+uTVdadlyPr1FcruTSIenndouHNUaMH3c mqInQZj+mq3aP5ZZJOyVG679n5EZP9Lf3wmdDS/hq7kMJYOD/5OdJwGCk5+IIzlbPhm+ wMJjBd5ttoy/TN5vsauQvUMlR4DRow2H6e/pP8eDY6X1Tnyk7QLcsHZfZFL7HhprVD6c mJlenvc1rOS+q1WpeHptiYZ6bsekm7AG5BL6AUKovXXx/98O094mmIx6KTB5WfcXcV2J riHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=GTdGRgPIigqhCym2EWisOZPEsTKxXX4M6j+43YRLjYw=; b=F+hLJwtTuNe3orqaLsds8gRWF1Ws+RQdRhMrGjX78XeU/ze7UgqUrQDPMlX6MUrTLw jy2dtGXTDNGMRexzoKRx1Ee4TitbK8+0DmOCas6Sk2h30Txlf6MONO+Fz3F0lFWQGDGe I0CpoVxQadnai2xqkW1CA5nA06ty5y31InoS4i408RVFD4LqJdvNTf3xngHMfwq/J3dd 7KAeqrs3vz/LtySiRCMSGGzbvNJWeQkKCNtC6Ed2OGLdDOrNxBD8REzHlOiYEOM/O0UO ne7mp83MpgJw8aYTWShT1C99Ru/F6xegkDPqIreYlK2bDbCWy4lL9XxfO0tlyWcmXjdY gyzQ== X-Gm-Message-State: AMke39mM+olh0w4CdEhcSXFuSdG2R2Cb35OHzadzC8QlqA7jUgwmVt+ycm9WUzI5dchKjz+V+ouhIXpmba2NHA== X-Received: by 10.55.16.91 with SMTP id a88mr29970303qkh.66.1487778135411; Wed, 22 Feb 2017 07:42:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.41.33 with HTTP; Wed, 22 Feb 2017 07:41:55 -0800 (PST) In-Reply-To: References: <1487688349587-5794194.post@n5.nabble.com> From: Claus Ibsen Date: Wed, 22 Feb 2017 16:41:55 +0100 Message-ID: Subject: Re: Stop component "direct-vm" from another OSGI camelContext To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Wed, 22 Feb 2017 15:42:20 -0000 You need to start the CamelContext first Also we dont encourge end user to create their own osgi camel context, as there is a bunch of stuff you need to do this so its correct. Take a look at how eg camel-scr for example does some stuff. On Tue, Feb 21, 2017 at 4:51 PM, souciance wrote: > Before running it a second time, you can run bundle:list to see if that > bundle containing the first consumer is active or not. > > On Tue, Feb 21, 2017 at 3:45 PM, alexey-s [via Camel] < > ml-node+s465427n5794194h77@n5.nabble.com> wrote: > >> There are two OSGI bundle. >> >> First OSGI bundle >> >> from("direct-vm:makeDoc") >> .bean(loacalBean, "make"); >> >> >> Second OSGI bundle >> >> void execute(String entityGuid) { >> SimpleRegistry registry =3D new SimpleRegistry(); >> BundleContext bundleContext =3D FrameworkUtil.getBundle( >> ImportDoc.class).getBundleContext(); >> OsgiDefaultCamelContext camelContext =3D new OsgiDefaultCamelCon= text(bundleContext, >> registry); >> >> ProducerTemplate template =3D camelContext.createProducerTemplat= e(); >> >> template.sendBody("direct-vm:ccweMakeDocumentByEntityGuid", >> entityGuid); >> >> camelContext.stop(); >> } >> >> Starting Apache Karaf. >> The first time the method runs smoothly. >> The second call results in an error >> >> Caused by: org.apache.camel.component.directvm. >> DirectVmConsumerNotAvailableException: No consumers available on >> endpoint: Endpoint[direct-vm >> ://makeDoc]. Exchange[ID-localhost-49500-1484729787207-82-2] >> at org.apache.camel.component.directvm.DirectVmProducer. >> process(DirectVmProducer.java:56)[53:org.apache.camel.camel-core:2.17.3] >> >> >> Why component "direct-vm:makeDoc" was stopped from another CamelContext? >> >> The error is repeated in the next versions >> camel 2.17.3 >> camel 2.18.2 >> >> >> >> >> Aleksey >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> http://camel.465427.n5.nabble.com/Stop-component-direct-vm- >> from-another-OSGI-camelContext-tp5794194.html >> To start a new topic under Camel - Users, email >> ml-node+s465427n465428h31@n5.nabble.com >> To unsubscribe from Camel - Users, click here >> >> . >> NAML >> >> > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Stop-comp= onent-direct-vm-from-another-OSGI-camelContext-tp5794194p5794196.html > Sent from the Camel - Users mailing list archive at Nabble.com. --=20 Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2