Hi

 I'm trying to add a component in my camel context using method
addComponent on CamelContext.
Everything seems to work correctly, but when my servicemix starts, the
bundle stays in state GracePeriod and in log file I can read :

2014-04-22 14:24:45,913 | INFO  | rint Extender: 2 | BlueprintContainerImpl
          | 10 - org.apache.aries.blueprint - 0.3.2 | *Bundle esb-sync is
waiting for dependencies [(&(component=central*
*)(objectClass=org.apache.camel.spi.ComponentResolver))]*

Here is my method to add component* :*

    private void addBrokerToCamelContext(String componentId, String
brokerUrl) {
        if (getContext().getComponent(componentId) == null) {
            LOGGER.info("Registering component {}", componentId);
            ActiveMQComponent component =
ActiveMQComponent.activeMQComponent(brokerUrl);
            component.setAcknowledgementMode(Session.AUTO_ACKNOWLEDGE);
            component.setCamelContext(getContext());
            try {
                component.start();
            } catch (Exception exc) {
                LOGGER.error("Problem starting component {}", componentId,
exc);
            }
            getContext().addComponent(componentId, component);
        } else {
            LOGGER.info("Component {} already created", componentId);
        }
    }

Thanks for help
Matthieu

Reply via email to