This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 017911faa7b84be7148cc571650c4cb30ab4dfb7 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Fri Aug 9 16:08:50 2024 +0200 CAMEL-21066: removed outdated information from components documentation - Blueprint details - OSGI-related information --- .../main/docs/aws2-kinesis-firehose-component.adoc | 5 -- .../src/main/docs/bean-validator-component.adoc | 10 --- .../src/main/docs/braintree-component.adoc | 49 ----------- .../src/main/docs/cxf-transport.adoc | 34 +------- .../camel-elytron/src/main/docs/elytron.adoc | 5 -- .../src/main/docs/hazelcast-summary.adoc | 50 ----------- .../camel-hl7/src/main/docs/hl7-dataformat.adoc | 16 ---- .../camel-ignite/src/main/docs/ignite-summary.adoc | 20 +---- .../camel-jetty/src/main/docs/jetty-component.adoc | 98 +--------------------- .../camel-kafka/src/main/docs/kafka-component.adoc | 4 +- .../camel-ldif/src/main/docs/ldif-component.adoc | 21 ----- .../src/main/docs/master-component.adoc | 2 +- .../src/main/docs/netty-http-component.adoc | 5 -- .../camel-slack/src/main/docs/slack-component.adoc | 30 +------ .../src/main/docs/undertow-spring-security.adoc | 3 - 15 files changed, 9 insertions(+), 343 deletions(-) diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc index 4927c0ac102..6377753eb21 100644 --- a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc +++ b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc @@ -23,11 +23,6 @@ You must have a valid Amazon Web Services developer account, and be signed up to use Amazon Kinesis Firehose. More information is available at https://aws.amazon.com/kinesis/firehose/[AWS Kinesis Firehose] -[NOTE] -==== -The AWS2 Kinesis Firehose component is not supported in OSGI -==== - == URI Format [source,java] diff --git a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc index 5aec4d15d6c..02ec18faa9f 100644 --- a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc +++ b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc @@ -57,16 +57,6 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END - - -== OSGi deployment - -To use Hibernate Validator in the OSGi environment use dedicated -`ValidationProviderResolver` implementation, just as -`org.apache.camel.component.bean.validator.HibernateValidationProviderResolver`. -The snippet below demonstrates this approach. You can also -use `HibernateValidationProviderResolver`. - === Using HibernateValidationProviderResolver [tabs] diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc index aa92e45fbd0..d304608e74a 100644 --- a/components/camel-braintree/src/main/docs/braintree-component.adoc +++ b/components/camel-braintree/src/main/docs/braintree-component.adoc @@ -50,61 +50,12 @@ include::partial$component-endpoint-options.adoc[] == Examples -[tabs] -==== -Java:: -+ [source,java] ---- from("direct://GENERATE") .to("braintree://sclientToken/generate"); ---- -OSGi Blueprint:: -+ -[source,xml] ----- -<?xml version="1.0"?> -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" - xsi:schemaLocation=" - http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd - http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd - http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> - - - <cm:property-placeholder id="placeholder" persistent-id="camel.braintree"> - </cm:property-placeholder> - - <bean id="braintree" class="org.apache.camel.component.braintree.BraintreeComponent"> - <property name="configuration"> - <bean class="org.apache.camel.component.braintree.BraintreeConfiguration"> - <property name="environment" value="${environment}"/> - <property name="merchantId" value="${merchantId}"/> - <property name="publicKey" value="${publicKey}"/> - <property name="privateKey" value="${privateKey}"/> - </bean> - </property> - </bean> - - <camelContext trace="true" xmlns="http://camel.apache.org/schema/blueprint" id="braintree-example-context"> - <route id="braintree-example-route"> - <from uri="direct:generateClientToken"/> - <to uri="braintree://clientToken/generate"/> - <to uri="stream:out"/> - </route> - </camelContext> - -</blueprint> ----- -+ -[NOTE] -===== -Starting from Camel 4, OSGI Blueprint is considered a *legacy* DSL. Users are strongly advised to migrate to the modern XML IO DSL. -===== - -==== - == More Information For more information on the endpoints and options see Braintree diff --git a/components/camel-cxf/camel-cxf-transport/src/main/docs/cxf-transport.adoc b/components/camel-cxf/camel-cxf-transport/src/main/docs/cxf-transport.adoc index 224721d833d..11973aee110 100644 --- a/components/camel-cxf/camel-cxf-transport/src/main/docs/cxf-transport.adoc +++ b/components/camel-cxf/camel-cxf-transport/src/main/docs/cxf-transport.adoc @@ -223,39 +223,7 @@ You can specify the camel context in the camel conduit `camel:camelContextRef` -The camel context id which you want inject into the camel conduit - -[[CamelTransportforCXF-ConfigurethedestinationandconduitwithBlueprint]] -== Configure the destination and conduit with Blueprint - -Camel Transport for CXF supports configuration with Blueprint. - -If you are using blueprint, you should use the namespace -`\http://cxf.apache.org/transports/camel/blueprint` and import the schema -like the blow. - -*Adding the Configuration Namespace for blueprint* - -[source,java] ------------------------------------------------------------------------------ -<beans ... - xmlns:camel="http://cxf.apache.org/transports/camel/blueprint" - ... - xsi:schemaLocation="... - http://cxf.apache.org/transports/camel/blueprint - http://cxf.apache.org/schmemas/blueprint/camel.xsd - ...> ------------------------------------------------------------------------------ - -In blueprint `camel:conduit` `camel:destination` only has one -camelContextId attribute, they doesn't support to specify the camel -context in the camel destination. - -[source,java] ------------------------------------------------------------------------- - <camel:conduit id="*.camel-conduit" camelContextId="camel1" /> - <camel:destination id="*.camel-destination" camelContextId="camel1" /> ------------------------------------------------------------------------- +The camel context id which you want to inject into the camel conduit [[CamelTransportforCXF-ExampleUsingCamelasaloadbalancerforCXF]] == Example Using Camel as a load balancer for CXF diff --git a/components/camel-elytron/src/main/docs/elytron.adoc b/components/camel-elytron/src/main/docs/elytron.adoc index efa079a8d1d..789625a5153 100644 --- a/components/camel-elytron/src/main/docs/elytron.adoc +++ b/components/camel-elytron/src/main/docs/elytron.adoc @@ -32,11 +32,6 @@ Each exchange created by Undertow endpoint with Elytron security contains header with current Elytron's security identity as value. (`org.wildfly.security.auth.server.SecurityIdentity`) or is _FORBIDDEN_ (status code 403) -[NOTE] -==== -OSGi is not supported. -==== - Maven users will need to add the following dependency to their `pom.xml` for this component: diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-summary.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-summary.adoc index df2f4aafac8..46dd14b1c42 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-summary.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-summary.adoc @@ -134,56 +134,6 @@ In the example above we set up this for the hazelcast map component and setup ha </bean> ------------------------------------------------------------------------------ -== Publishing hazelcast instance as an OSGI service - -If operating in an OSGI container, and you would want to use one instance -of hazelcast across all bundles in the same container. You can publish -the instance as an OSGI service and bundles using the cache al need is -to reference the service in the hazelcast endpoint. - -=== Bundle A create an instance and publish it as an OSGI service - -[source,xml] --------------------------------------------------------------------------------------------------------- -<bean id="config" class="com.hazelcast.config.FileSystemXmlConfig"> - <argument type="java.lang.String" value="${hazelcast.config}"/> -</bean> - -<bean id="hazelcastInstance" class="com.hazelcast.core.Hazelcast" factory-method="newHazelcastInstance"> - <argument type="com.hazelcast.config.Config" ref="config"/> -</bean> - -<!-- publishing the hazelcastInstance as a service --> -<service ref="hazelcastInstance" interface="com.hazelcast.core.HazelcastInstance" /> --------------------------------------------------------------------------------------------------------- - -=== Bundle B uses the instance - -[source,xml] --------------------------------------------------------------------------------------- -<!-- referencing the hazelcastInstance as a service --> -<reference ref="hazelcastInstance" interface="com.hazelcast.core.HazelcastInstance" /> - -<camelContext xmlns="http://camel.apache.org/schema/blueprint"> - <route id="testHazelcastInstanceBeanRefPut"> - <from uri="direct:testHazelcastInstanceBeanRefPut"/> - <setHeader name="CamelHazelcastOperationType"> - <constant>put</constant> - </setHeader> - <to uri="hazelcast-map:testmap?hazelcastInstance=#hazelcastInstance"/> - </route> - - <route id="testHazelcastInstanceBeanRefGet"> - <from uri="direct:testHazelcastInstanceBeanRefGet" /> - <setHeader name="CamelHazelcastOperationType"> - <constant>get</constant> - </setHeader> - <to uri="hazelcast-map:testmap?hazelcastInstance=#hazelcastInstance"/> - <to uri="seda:out" /> - </route> -</camelContext> --------------------------------------------------------------------------------------- - :camel-spring-boot-name: hazelcast include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc index c7b951c938d..4d35e1fef64 100644 --- a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc +++ b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc @@ -380,21 +380,5 @@ versions 2.4 and 2.5, then the following dependencies must be added: </dependency> ---- -Alternatively, an OSGi bundle containing the base library, all -structures libraries and required dependencies (on the bundle classpath) -can be downloaded from the -https://repo1.maven.org/maven2/ca/uhn/hapi/hapi-osgi-base[central Maven -repository]. - -[source,xml] ----- -<dependency> - <groupId>ca.uhn.hapi</groupId> - <artifactId>hapi-osgi-base</artifactId> - <version>2.2</version> -</dependency> ----- - - include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-ignite/src/main/docs/ignite-summary.adoc b/components/camel-ignite/src/main/docs/ignite-summary.adoc index 937a254a29e..8b688f2045a 100644 --- a/components/camel-ignite/src/main/docs/ignite-summary.adoc +++ b/components/camel-ignite/src/main/docs/ignite-summary.adoc @@ -31,7 +31,7 @@ To use this component, add the following dependency to your `pom.xml`: </dependency> ---- -IMPORTANT: If running in an OSGi container, please consult the <<Ignite-OsgiSupport,OSGi Support>> section below. + @@ -50,7 +50,7 @@ There are three ways to initialize the Ignite component: </bean> ------------------------------------------------------------ -* By passing in an IgniteConfiguration, either constructed programmatically or through inversion of control (e.g., Spring, Blueprint, etc). +* By passing in an IgniteConfiguration, either constructed programmatically or through inversion of control (e.g., Spring, etc). Here's an example using Spring config: [source,xml] @@ -96,22 +96,6 @@ If the underlying Ignite operation returns void (no return type), this flag dete Some Ignite operations can deal with multiple elements at once, if passed a Collection. Enabling this option will treat Collections as a single object, invoking the operation variant for cardinality 1. |======================================================================= -[[Ignite-OsgiSupport]] -== OSGi Support - -[TIP] -==== -Apache Ignite supports OSGi from version 1.5.0.final onwards. -==== - -When installing on Apache Karaf: - -1. Installing the camel-ignite feature will require the Ignite feature repository to be present. -2. You must have exported from the JRE (system bundle) some low-level, non-standard packages that Ignite requires. - -Please refer to the OSGi section in the Ignite documentation for more information. - - :camel-spring-boot-name: ignite include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-jetty/src/main/docs/jetty-component.adoc b/components/camel-jetty/src/main/docs/jetty-component.adoc index d34a8b87965..05bc345ad54 100644 --- a/components/camel-jetty/src/main/docs/jetty-component.adoc +++ b/components/camel-jetty/src/main/docs/jetty-component.adoc @@ -207,39 +207,6 @@ Spring DSL based configuration of endpoint <to uri="jetty:https://127.0.0.1/mail/?sslContextParameters=#sslContextParameters"/> ---- -[[HTTP-Blueprintbasedconfigurationofendpoint]] -Blueprint based configuration of endpoint - -Global configuration of sslContextParameters in a dedicated Blueprint XML file - -[source,xml] ----- -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> - - <sslContextParameters id="sslContextParameters" xmlns="http://camel.apache.org/schema/blueprint"> - <keyManagers keyPassword="keyPassword"> - <keyStore resource="etc/keystore.p12" password="keystorePassword"/> - </keyManagers> - </sslContextParameters> - - <service ref="sslContextParameters" auto-export="all-classes"/> -</blueprint> ----- - -Use of the global configuration in other Blueprint XML files with route definitions - -[source,xml] ----- -... -<reference id="sslContextParameters" interface="org.apache.camel.support.jsse.SSLContextParameters" ext:proxy-method="classes" /> - - <camelContext xmlns="http://camel.apache.org/schema/blueprint"> - <route> - <from uri="jetty:https://0.0.0.0/path?sslContextParameters=#sslContextParameters"/> -... ----- [[Jetty-ConfiguringJettyDirectly]] Configuring Jetty Directly @@ -487,75 +454,12 @@ You can then define the endpoint as: [source,java] ---- -from("jetty:http://0.0.0.0:9080/myservice?handlers=securityHandler") +from("jetty:http://0.0.0.0:9080/myservice?handlers=securityHandler"); ---- If you need more handlers, set the `handlers` option equal to a comma-separated list of bean IDs. -Blueprint-based definition of basic authentication (based on Jetty 12): - -[source,xml] ----- -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" - xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> - - <bean id="constraint" class="org.eclipse.jetty.util.security.Constraint"> - <property name="name" value="BASIC"/> - <property name="authenticate" value="true"/> - <property name="roles"> - <list> - <value>rolename1</value> - </list> - </property> - </bean> - - <bean id="constraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> - <property name="constraint" ref="constraint"/> - <property name="pathSpec" value="/path"/> - </bean> - - <bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler"> - <property name="loginService"> - <bean class="org.eclipse.jetty.security.HashLoginService"> - <property name="config" value="/opt/apache-karaf/etc/roles.properties"/> - <property name="hotReload" value="true"/> - </bean> - </property> - <property name="authenticator"> - <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator"/> - </property> - <property name="constraintMappings"> - <list> - <ref component-id="constraintMapping"/> - </list> - </property> - </bean> - - <camelContext xmlns="http://camel.apache.org/schema/blueprint"> - - <route> - <from uri="jetty:http://0.0.0.0/path?handlers=securityHandler"/> -... ----- - -The `roles.properties` files contain - ----- -username1=password1,rolename1 -username2=password2,rolename1 ----- - -This file is located in the `etc` folder and will be reloaded when changed. The endpoint: - ----- -http://0.0.0.0/path ----- - -It is now secured with basic authentication. Only `username1` with `password1` and `username2` with `password2` are able to access the endpoint. - === How to return a custom HTTP 500 reply message You may want to return a custom reply message when something goes wrong, diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 916013c5969..5ec132be9b3 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -129,7 +129,7 @@ If setting this value explicitly, be aware that there is a tradeoff between the |=== The repository can be instantiated by defining the `topic` and `bootstrapServers`, or the `producerConfig` and `consumerConfig` property sets can be explicitly defined to enable features such as SSL/SASL. -To use, this repository must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware. +To use, this repository must be placed in the Camel registry, either manually or by registration as a bean in Spring, as it is `CamelContext` aware. Sample usage is as follows: @@ -337,7 +337,7 @@ from("kafka:my_topic?headerFilterStrategy=#myStrategy") .to("kafka:my_topic?headerFilterStrategy=#myStrategy") ---- -`myStrategy` object should be a subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware. +`myStrategy` object should be a subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring, as it is `CamelContext` aware. === Kafka Transaction diff --git a/components/camel-ldif/src/main/docs/ldif-component.adoc b/components/camel-ldif/src/main/docs/ldif-component.adoc index dc0dc06e9ed..fd194422c12 100644 --- a/components/camel-ldif/src/main/docs/ldif-component.adoc +++ b/components/camel-ldif/src/main/docs/ldif-component.adoc @@ -114,27 +114,6 @@ The `LdapConnection` bean may be defined as follows in Spring XML: <bean id="ldapConnection" factory-bean="ldapConnectionFactory" factory-method="newLdapConnection" scope="prototype"/> ---- -or in a OSGi `blueprint.xml`: - -[source,xml] ----- -<bean id="ldapConnectionOptions" class="org.apache.directory.ldap.client.api.LdapConnectionConfig"> - <property name="ldapHost" value="${ldap.host}"/> - <property name="ldapPort" value="${ldap.port}"/> - <property name="name" value="${ldap.username}"/> - <property name="credentials" value="${ldap.password}"/> - <property name="useSsl" value="false"/> - <property name="useTls" value="false"/> -</bean> - -<bean id="ldapConnectionFactory" class="org.apache.directory.ldap.client.api.DefaultLdapConnectionFactory"> - <argument ref="ldapConnectionOptions"/> -</bean> - -<bean id="ldapConnection" factory-ref="ldapConnectionFactory" factory-method="newLdapConnection" scope="prototype"/> ----- - - == Examples Following on from the Spring configuration above, the code sample below diff --git a/components/camel-master/src/main/docs/master-component.adoc b/components/camel-master/src/main/docs/master-component.adoc index 519f3892068..ed906408e72 100644 --- a/components/camel-master/src/main/docs/master-component.adoc +++ b/components/camel-master/src/main/docs/master-component.adoc @@ -98,7 +98,7 @@ service.setBasePath("/camel/cluster"); context.addService(service) ---- -* *Xml (Spring/Blueprint)* +* *Xml (Spring)* + [source,xml] ---- diff --git a/components/camel-netty-http/src/main/docs/netty-http-component.adoc b/components/camel-netty-http/src/main/docs/netty-http-component.adoc index 14b3b8cea92..185c23d81c9 100644 --- a/components/camel-netty-http/src/main/docs/netty-http-component.adoc +++ b/components/camel-netty-http/src/main/docs/netty-http-component.adoc @@ -338,11 +338,6 @@ And in the routes you refer to this option as shown below </route> ---------------------------------------------------------------------------------------------------------- -=== Reusing the same server bootstrap configuration with multiple routes across multiple bundles in OSGi container - -See the Netty HTTP Server Example -for more details and example how to do that. - === Implementing a reverse proxy Netty HTTP component can act as a reverse proxy, in that case diff --git a/components/camel-slack/src/main/docs/slack-component.adoc b/components/camel-slack/src/main/docs/slack-component.adoc index 88d25594eb0..5a4735b490b 100644 --- a/components/camel-slack/src/main/docs/slack-component.adoc +++ b/components/camel-slack/src/main/docs/slack-component.adoc @@ -67,8 +67,7 @@ https://api.slack.com/incoming-webhooks[Slack incoming webhook] must be configur === Configuring in Spring XML -The SlackComponent with XML must be configured as a Spring or Blueprint -bean that contains the incoming webhook url or the app token for the integration as a +The SlackComponent with XML must be configured as a Spring bean that contains the incoming webhook url or the app token for the integration as a parameter. [source,xml] @@ -79,32 +78,7 @@ parameter. </bean> ----------------------------------------------------------------------------------------------------------------------- -=== Configuring in Java - -For Java, you can configure this using Java code. - -=== Example - -A CamelContext with Blueprint could be as: - -[source,xml] ---------------------------------------------------------------------------------------------------------------------------- -<?xml version="1.0" encoding="UTF-8"?> -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" default-activation="lazy"> - - <bean id="slack" class="org.apache.camel.component.slack.SlackComponent"> - <property name="webhookUrl" value="https://hooks.slack.com/services/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"/> - </bean> - - <camelContext xmlns="http://camel.apache.org/schema/blueprint"> - <route> - <from uri="direct:test"/> - <to uri="slack:#channel?iconEmoji=:camel:&username=CamelTest"/> - </route> - </camelContext> - -</blueprint> ---------------------------------------------------------------------------------------------------------------------------- +NOTE: for Java, you can configure this using Java code. === Producer diff --git a/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc b/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc index 52f19987094..1053a89fd93 100644 --- a/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc +++ b/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc @@ -11,9 +11,6 @@ *Since Camel {since}* -*OSGi is not supported* - - The Spring Security Provider provides Spring Security (5.x) token bearer security over the camel-undertow component. To force camel-undertow to use spring security provider: