-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add (more) Spring JMS support #6308
Conversation
context.close() | ||
|
||
where: | ||
config << [AnnotatedListenerConfig, ManualListenerConfig] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the existing test (which passed with just JMS listener instrumentation) was AnnotatedListenerConfig
, and the new test that exercises the new instrumentation is ManualListenerConfig
@trask I think that adding a dependency on |
@Override | ||
public void transform(TypeTransformer transformer) { | ||
transformer.applyAdviceToMethod( | ||
named("onMessage").and(takesArguments(2)).and(isPublic()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message
is used in the advice
named("onMessage").and(takesArguments(2)).and(isPublic()), | |
named("onMessage").and(isPublic()).and(takesArguments(2)).and(takesArgument(0, named("javax.jms.Message"))), |
* Add (more) Spring JMS support * Remove duplication * Better advice matcher
* Add (more) Spring JMS support * Remove duplication * Better advice matcher
* Add (more) Spring JMS support * Remove duplication * Better advice matcher
Adds support for
org.springframework.jms.listener.SessionAwareMessageListener
direct listener usage.I tried to repro with
@JmsListener
that acceptsSession
as second arg, but Spring tunnels that through normal 2-arg JMS MessageListener (the one with Session arg), which is already instrumented by JMS instrumentation.Open question
I copy-pasted a bunch of code from the
jms-1.1
instrumentation to the newspring-jms-2.0
instrumentation.I could alternatively add a direct dependency from
spring-jms-2.0
instrumentation onjms-1.1
instrumentation.I'm a little worried about the
DbInfo
class loader problem, of having the same classes referenced from two different class loaders.But I guess not, since that was only a problem from passing
DbInfo
in between those two class loaders, which I don't think would happen here since nothing would be passed between the two instrumentation, just pure reuse of classes fromjms-1.1
.@laurit wdyt?