Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 89 additions & 82 deletions opentracing-jms-spring/pom.xml
Original file line number Diff line number Diff line change
@@ -1,82 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2017-2019 The OpenTracing Authors

Licensed 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jms-parent</artifactId>
<version>0.1.5-SNAPSHOT</version>
</parent>

<artifactId>opentracing-jms-spring</artifactId>
<name>OpenTracing Instrumentation for Spring JMS API</name>
<description>OpenTracing Instrumentation for Spring JMS API</description>

<properties>
<spring.version>5.1.8.RELEASE</spring.version>
</properties>

<dependencies>

<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jms-2</artifactId>
<version>0.1.5-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${activemq.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>
<version>${activemq.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.25.1</version>
<scope>test</scope>
</dependency>

</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2017-2019 The OpenTracing Authors

Licensed 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jms-parent</artifactId>
<version>0.1.5-SNAPSHOT</version>
</parent>

<artifactId>opentracing-jms-spring</artifactId>
<name>OpenTracing Instrumentation for Spring JMS API</name>
<description>OpenTracing Instrumentation for Spring JMS API</description>

<properties>
<spring.version>5.1.8.RELEASE</spring.version>
</properties>

<dependencies>

<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-jms-2</artifactId>
<version>0.1.5-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.1.6.RELEASE</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${activemq.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>
<version>${activemq.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.25.1</version>
<scope>test</scope>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.JmsListenerConfigurer;
Expand All @@ -39,24 +40,28 @@ public TracingJmsConfiguration(ObjectProvider<MessageConverter> messageConverter
}

@Bean
@ConditionalOnMissingBean
public TracingMessagingMessageListenerAdapter createTracingMessagingMessageListenerAdapter(
Tracer tracer) {
return new TracingMessagingMessageListenerAdapter(tracer,traceInLog);
}

@Bean
@ConditionalOnMissingBean
public TracingJmsListenerEndpointRegistry createTracingJmsListenerEndpointRegistry(
TracingMessagingMessageListenerAdapter listenerAdapter) {
return new TracingJmsListenerEndpointRegistry(listenerAdapter);
}

@Bean
@ConditionalOnMissingBean
public JmsListenerConfigurer createTracingJmsListenerConfigurer(
TracingJmsListenerEndpointRegistry registry) {
return new TracingJmsListenerConfigurer(registry);
}

@Bean
@ConditionalOnMissingBean
public JmsTemplate jmsTemplate(BeanFactory beanFactory, Tracer tracer) {
// we create lazy proxy, to avoid dependency and config order
// if JMS is used, and ConnectionFactory bean is not present,
Expand Down