How does you RouteBuilder look like ?
BTW, the example that I showed you is create the CamelContext first,
then add the RouteBuilder into the CamelContext.
Willem
Srivatsa Katta wrote:
Hi,
Yes I got it working with the spring, but not able to get it working it with
programmatic way of registering.
Like Willem mentioned, am doing exactly the same thing,
context.addComponent("foo", component), but am doing this in the
RouteBuilder (first thing in the configure method).
Was wondering if that is the right place to add custom components ? Is this
the reason why its not able to recognize the component ?
Cheers!
Katta
willem.jiang wrote:
Hi
You can find the example in the unit of JMS , which register the jms
component dynamically.
Here is the code snippet.
CamelContext camelContext = super.createCamelContext();
ConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
camelContext.addComponent("jms",
jmsComponentClientAcknowledge(connectionFactory));
Willem
Srivatsa Katta wrote:
Hi,
I am trying to register a custom component, which is the right place to
register/add a new component programaticaly. Currently doing it in
RouteBuilder, but when I use that component in one of the routes, it
throws
up the Failed to resolve endpoint with scheme <componentname>.
And is there any example or good documentation on creating and using
custom
components, the documentation provided in the camel
http://camel.apache.org/writing-components.html WritingComponents isn't
good enough for newbies I think.
Any pointers would be helpful.
Cheers!
Katta