-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAMEL-20600: camel-activemq6 for using 6.x brokers
- Loading branch information
Showing
16 changed files
with
3,204 additions
and
5 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...r-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
activemq | ||
activemq6 | ||
amqp | ||
arangodb | ||
as2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
259 changes: 259 additions & 0 deletions
259
...ringboot/src/main/resources/org/apache/camel/springboot/catalog/components/activemq6.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.camel.springboot</groupId> | ||
<artifactId>components-starter</artifactId> | ||
<version>4.7.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>camel-activemq6-starter</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Camel SB Starters :: ActiveMQ 6.x</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
<version>${spring-boot-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel</groupId> | ||
<artifactId>camel-activemq6</artifactId> | ||
<version>${camel-version}</version> | ||
</dependency> | ||
<!--START OF GENERATED CODE--> | ||
<dependency> | ||
<groupId>org.apache.camel.springboot</groupId> | ||
<artifactId>camel-core-starter</artifactId> | ||
</dependency> | ||
<!--END OF GENERATED CODE--> | ||
</dependencies> | ||
</project> |
746 changes: 746 additions & 0 deletions
746
components-starter/camel-activemq6-starter/src/main/docs/activemq6.json
Large diffs are not rendered by default.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
...a/org/apache/camel/component/activemq6/springboot/ActiveMQComponentAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.component.activemq6.springboot; | ||
|
||
import org.apache.camel.CamelContext; | ||
import org.apache.camel.Component; | ||
import org.apache.camel.component.activemq6.ActiveMQComponent; | ||
import org.apache.camel.spi.ComponentCustomizer; | ||
import org.apache.camel.spring.boot.CamelAutoConfiguration; | ||
import org.apache.camel.spring.boot.ComponentConfigurationProperties; | ||
import org.apache.camel.spring.boot.util.CamelPropertiesHelper; | ||
import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans; | ||
import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties; | ||
import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.AutoConfigureAfter; | ||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
import org.springframework.context.ApplicationContext; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Conditional; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Lazy; | ||
|
||
/** | ||
* Generated by camel-package-maven-plugin - do not edit this file! | ||
*/ | ||
@Configuration(proxyBeanMethods = false) | ||
@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class) | ||
@EnableConfigurationProperties({ComponentConfigurationProperties.class,ActiveMQComponentConfiguration.class}) | ||
@ConditionalOnHierarchicalProperties({"camel.component", "camel.component.activemq6"}) | ||
@AutoConfigureAfter({CamelAutoConfiguration.class, ActiveMQComponentConverter.class}) | ||
public class ActiveMQComponentAutoConfiguration { | ||
|
||
@Autowired | ||
private ApplicationContext applicationContext; | ||
private final CamelContext camelContext; | ||
@Autowired | ||
private ActiveMQComponentConfiguration configuration; | ||
|
||
public ActiveMQComponentAutoConfiguration( | ||
org.apache.camel.CamelContext camelContext) { | ||
this.camelContext = camelContext; | ||
} | ||
|
||
@Lazy | ||
@Bean | ||
public ComponentCustomizer configureActiveMQComponent() { | ||
return new ComponentCustomizer() { | ||
@Override | ||
public void configure(String name, Component target) { | ||
CamelPropertiesHelper.copyProperties(camelContext, configuration, target); | ||
} | ||
@Override | ||
public boolean isEnabled(String name, Component target) { | ||
return HierarchicalPropertiesEvaluator.evaluate( | ||
applicationContext, | ||
"camel.component.customizer", | ||
"camel.component.activemq6.customizer") | ||
&& target instanceof ActiveMQComponent; | ||
} | ||
}; | ||
} | ||
} |
Oops, something went wrong.