This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 278c3821ecb64d8577bf4ce0fe88228842eae4eb Author: Claus Ibsen <[email protected]> AuthorDate: Mon Dec 23 10:52:39 2019 +0100 Regen --- docs/components/modules/ROOT/pages/osgi-activator.adoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/components/modules/ROOT/pages/osgi-activator.adoc b/docs/components/modules/ROOT/pages/osgi-activator.adoc index 00438d2..e4de6bb 100644 --- a/docs/components/modules/ROOT/pages/osgi-activator.adoc +++ b/docs/components/modules/ROOT/pages/osgi-activator.adoc @@ -55,3 +55,20 @@ And it's automatically added or removed to the context from any bundle! ---- Route: route1 started and consuming from: timer://test?fixedRate=true&period=1000 ---- + +For routes that need to be started before the CamelContext the "camel.osgi.activator.pre-startup" service property may be added. + +[source,java] +---- +@Component(service = RouteBuilder.class, property = {CamelRoutesActivatorConstants.PRE_START_UP_PROP_NAME + "=true"}) +public class MyStartupRouteBuilder extends RouteBuilder { + @Override + public void configure() throws Exception { + getContext().setStreamCaching(true); + + restConfiguration().component("netty-http").port(8080); + } +} +---- + +If this RouteBuilder is added after other non pre startup RouteBuilders then CamelContext will automatically restart. This allows pre start up RouteBuilder to run their configure methods before other RouteBuilders.
