You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/08/23 14:36:54 UTC
[GitHub] [cxf] valentin-matignon commented on a change in pull request #826: Delete temporary queue when it is used
valentin-matignon commented on a change in pull request #826:
URL: https://github.com/apache/cxf/pull/826#discussion_r694031785
##########
File path: rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
##########
@@ -282,6 +283,9 @@ private void sendAndReceiveMessage(final Exchange exchange, final Object request
jmsConfig.getReceiveTimeout(),
jmsConfig.isPubSubNoLocal(),
exchange);
+ if (replyDestination instanceof TemporaryQueue) {
Review comment:
Hi @reta, thank you for your answer and sorry to respond so late !
I agree with you, `JMSConfiguration` should delete temporary queues.
As you advised, in my last commit i delete temporary queues in the `resetCachedReplyDestination` method of the `JMSConfiguration` class.
However, `resetCachedReplyDestination` is called in two places places in the `JMSConduit` class :
- in a `ExceptionListener` in the `trySetExListener` method
- in the `sendExchange` method when a `JMSException` occurs
So i had to add the `resetCachedReplyDestination` in the `close` method of `JMSConduit` class to be sure that temporary queues are deleted every time they are used.
I didn't find a proper way to add one test case in unit tests, if you have some suggestions i could add it in my PR.
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org