Add support for extra MessageProducer method

This commit supports two additional methods of the MessageProducer
interface as from JMS 2.0

An integration test infrastructure is necessary to be able to test
those scenario: this is taken care of in a separated initiative.

Issue: SPR-11950
master
Stephane Nicoll 10 years ago
parent 134e5a2aec
commit c2da846732
  1. 6
      spring-jms/src/main/java/org/springframework/jms/connection/CachedMessageProducer.java

@ -282,6 +282,12 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
else if (args.length == 3) {
return sendWithDestinationAndCompletionListenerMethod.invoke(
target, args[0], args[1], deliveryMode, priority, timeToLive, args[2]);
} else if (args.length == 5) {
return sendWithCompletionListenerMethod.invoke(
target, args[0], args[1], args[2], args[3], args[4]);
} else if (args.length == 6) {
return sendWithDestinationAndCompletionListenerMethod.invoke(
target, args[0], args[1], args[2], args[3], args[4], args[5]);
}
}
return method.invoke(CachedMessageProducer.this, args);

Loading…
Cancel
Save