I have a use case, where I require a fast startup time for camel and wish
to avoid classpath scanning.
I use the Main class however it appears that its not possible to obtain a
ProducerTemplate template = getCamelTemplate();
before calling the run method. (it produces an ArrayOutOfBounds exception
Hi
Yeah we could add some methods to the Main class you can override to
have callbacks after start | before stop etc.
But you can also just use the event notifier api in Camel for that.
On Wed, Apr 3, 2013 at 4:17 PM, Andrew Bailey wrote:
> I have a use case, where I require a fast startup tim
Claus, thanks for the reply.
Ok I tried that, however, if in the bootstrap code in main just before
calling run() I place
List contexts=getCamelContexts();
System.out.println(contexts); // []
CamelContext context=contexts.get(0);
//IndexOutOfBoundsException: Index
Hi
Yeah we probably need some API on MainSupport so you can add a custom
EventNotifier, which we then add to the CamelContext before its
started.
Though another option that may be easier is just to have a beforeStart
| beforeStop method which you can implement and do your custom code
there. A bit
What I did was extend Main, overriding:
protected AbstractApplicationContext createDefaultApplicationContext();
The overridden method looks like:
@Override
public AbstractApplicationContext createDefaultApplicationContext() {
AbstractApplicationContext appctx =
super.createDefaultApplicationC
Chris,
Yeah this would work. But only when you use Spring.
We should have a common and easier solution for the MainSupport in camel-core.
I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6269
On Wed, Apr 10, 2013 at 4:24 PM, Chris Wolf wrote:
> What I did was extend Main, over