There are two OSGI bundle.

First OSGI bundle

from("direct-vm:makeDoc")
.bean(loacalBean, "make");


Second OSGI bundle

void execute(String entityGuid) {
        SimpleRegistry registry = new SimpleRegistry();
        BundleContext bundleContext =
FrameworkUtil.getBundle(ImportDoc.class).getBundleContext();
        OsgiDefaultCamelContext camelContext = new
OsgiDefaultCamelContext(bundleContext, registry);

        ProducerTemplate template = camelContext.createProducerTemplate();
        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



--
View this message in context: 
http://camel.465427.n5.nabble.com/Stop-component-direct-vm-from-another-OSGI-camelContext-tp5794194.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to