wu-sheng commented on code in PR #706:
URL: https://github.com/apache/skywalking-java/pull/706#discussion_r1684694860


##########
apm-sniffer/apm-sdk-plugin/spring-plugins/spring-jms-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/jms/define/MessageListenerInstrumentation.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * 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.skywalking.apm.plugin.spring.jms.define;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch;
+
+import static net.bytebuddy.matcher.ElementMatchers.named;
+
+public class MessageListenerInstrumentation extends 
ClassInstanceMethodsEnhancePluginDefine {
+
+    private static final String INTERCEPTOR_CLASS = 
"org.apache.skywalking.apm.plugin.spring.jms.MessageListenerInterceptor";
+    public static final String ENHANCE_CLASS = 
"org.springframework.jms.listener.AbstractMessageListenerContainer";
+    public static final String ENHANCE_METHOD = "doExecuteListener";
+
+    @Override
+    public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+        return new ConstructorInterceptPoint[0];
+    }
+
+    @Override
+    public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() 
{
+        return new InstanceMethodsInterceptPoint[] {
+                new InstanceMethodsInterceptPoint() {
+                    @Override
+                    public ElementMatcher<MethodDescription> 
getMethodsMatcher() {
+                        return named(ENHANCE_METHOD);
+                    }
+
+                    @Override
+                    public String getMethodsInterceptor() {
+                        return INTERCEPTOR_CLASS;
+                    }
+
+                    @Override
+                    public boolean isOverrideArgs() {
+                        return false;
+                    }
+                }
+        };
+    }
+
+    @Override
+    protected ClassMatch enhanceClass() {
+        return MultiClassNameMatch.byMultiClassMatch(ENHANCE_CLASS);

Review Comment:
   There is only class, you should use byName directly?



##########
docs/en/setup/service-agent/java-agent/Supported-list.md:
##########
@@ -84,6 +84,7 @@ metrics based on the tracing data.
   * [NATS](https://github.com/nats-io/nats.java) 2.14.x -> 2.15.x
   * [ActiveMQ-Artemis](https://github.com/apache/activemq) 2.30.0 -> 2.31.2
   * Aliyun ONS 1.x (Optional¹)
+  * Spring Jms 5.x

Review Comment:
   ```suggestion
     * Spring JMS 5.x
   ```
   



##########
CHANGES.md:
##########
@@ -22,7 +22,7 @@ Release Notes.
 * Improve 4x performance of ContextManagerExtendService.createTraceContext()
 * Add a plugin that supports the Solon framework.
 * Fixed issues in the MySQL component where the executeBatch method could 
result in empty SQL statements .
-
+* Add a plugin that supports the spring jms 5.x.

Review Comment:
   ```suggestion
   * Add a plugin that supports the Spring JMS 5.x.
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to