You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/27 08:17:14 UTC

[camel] 03/03: CAMEL-14175 - Removed Camel-Osgi-Activator now in camel-karaf (camel-karaf migration), docs

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit af75f719abe088d976b86ae50ef11f1d13e573e2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 27 09:12:41 2020 +0100

    CAMEL-14175 - Removed Camel-Osgi-Activator now in camel-karaf (camel-karaf migration), docs
---
 docs/components/modules/ROOT/nav.adoc              |  1 -
 docs/components/modules/ROOT/pages/index.adoc      |  4 +-
 .../modules/ROOT/pages/osgi-activator.adoc         | 74 ----------------------
 3 files changed, 1 insertion(+), 78 deletions(-)

diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 376b99c..e4a939e 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -265,7 +265,6 @@
 ** xref:openstack-swift-component.adoc[OpenStack Swift Component]
 ** xref:opentracing.adoc[OpenTracing Component]
 ** xref:optaplanner-component.adoc[OptaPlanner Component]
-** xref:osgi-activator.adoc[OSGi Camel Routes Activator]
 ** xref:eventadmin-component.adoc[OSGi EventAdmin Component]
 ** xref:paho-component.adoc[Paho Component]
 ** xref:pdf-component.adoc[PDF Component]
diff --git a/docs/components/modules/ROOT/pages/index.adoc b/docs/components/modules/ROOT/pages/index.adoc
index 75e89b6..496c0ab 100644
--- a/docs/components/modules/ROOT/pages/index.adoc
+++ b/docs/components/modules/ROOT/pages/index.adoc
@@ -829,7 +829,7 @@ Number of Languages: 17 in 11 JAR artifacts (0 deprecated)
 == Miscellaneous Components
 
 // others: START
-Number of Miscellaneous Components: 38 in 38 JAR artifacts (0 deprecated)
+Number of Miscellaneous Components: 37 in 37 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -863,8 +863,6 @@ Number of Miscellaneous Components: 38 in 38 JAR artifacts (0 deprecated)
 
 | xref:opentracing.adoc[OpenTracing] (camel-opentracing) | 2.19 | Distributed tracing using OpenTracing
 
-| xref:osgi-activator.adoc[Osgi Activator] (camel-osgi-activator) | 3.1 | Camel OSGi Activator for running Camel routes from other bundles
-
 | xref:platform-http-vertx.adoc[Platform Http Vertx] (camel-platform-http-vertx) | 3.2 | Implementation of the Platform HTTP Engine based on Vert.x Web
 
 | xref:reactive-executor-vertx.adoc[Reactive Executor Vert.x] (camel-reactive-executor-vertx) | 3.0 | Reactive Executor for camel-core using Vert.x
diff --git a/docs/components/modules/ROOT/pages/osgi-activator.adoc b/docs/components/modules/ROOT/pages/osgi-activator.adoc
deleted file mode 100644
index e4de6bb..0000000
--- a/docs/components/modules/ROOT/pages/osgi-activator.adoc
+++ /dev/null
@@ -1,74 +0,0 @@
-[[OsgiActivator]]
-= OSGi Camel Routes Activator
-:page-source: components/camel-osgi-activator/src/main/docs/osgi-activator.adoc
-
-*Since Camel 3.1*
-
-A small OSGi activator for starting an OSGi Apache Camel Project.
-
-The bundle starts a shared CamelContext and registers any RouteBuilder instances
-(discovered via the OSGi Service Registry), from any other bundles that gets installed.
-And when the bundles gets uninstalled then the routes are stopped and removed from the shared CamelContext.
-
-== Important
-
-This OSGi activator is a based prototype for quickly starting up an OSGi container with a single shared
-CamelContext and then being able to use OSGi dynamism to deploy and undeploy bundlers with Camel routes.
-
-Beware that this OSGi activator is a basic implementation and has limited support for dealing with errors
-when new routes are added which may clash with existing routes (route ids).
-
-Configuration of the CamelContext is also very limited.
-
-Therefore only use this for prototyping and experiments. This is NOT recommended for production usage.
-
-== Install bundle
-
-Register an Apache Camel RouteBuilder as an OSGi service.
-
-Using OSGi annotations:
-
-[source,java]
-----
-@Component(service = RouteBuilder.class)
-public class MyRouteBuilder extends RouteBuilder {
-    @Override
-    public void configure() throws Exception {
-        from("timer:test?fixedRate=true&period=1000")
-            .log("Hello");
-    }
-}
-----
-
-Or Manually:
-
-[source,java]
-----
-public void start(BundleContext context) throws Exception {
-  context.registerService(RouteBuilder.class, new MyRouteBuilder(), null);
-}
-----
-
-And it's automatically added or removed to the context from any bundle!
-
-[source,text]
-----
-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.