ARSLAN ALI created CXF-7079:
-------------------------------

             Summary: JMSConduit – is not removing entry from corelationMap if 
relpyMessage is null (timeout)
                 Key: CXF-7079
                 URL: https://issues.apache.org/jira/browse/CXF-7079
             Project: CXF
          Issue Type: Bug
    Affects Versions: 3.1.7
         Environment: apache CXF 3.0.5
            Reporter: ARSLAN ALI


We have the problem, that if a timeout is raised the temporary queue is not 
been deleted.
After code review of the JmsConduit class in both 3.0.5 and even in 3.1.7 we 
have seen, that in case of a timeout, cxf is only raises only an 
RuntimeException (JmsConduit line 256)
 javax.jms.Message replyMessage = 
jmsTemplate.receiveSelected(replyToDestination, messageSelector);
                    if (replyMessage == null) {
                        throw new RuntimeException("Timeout receiving message 
with correlationId " + correlationId);
                    } else {
                        doReplyMessage(exchange, replyMessage);
                    }
And RuntimeException is not handled in JMSConduit resulting in correlationMap 
is not removing the entry. 


public static Message receive(Session session,
Destination replyToDestination,
String correlationId,
long receiveTimeout,
boolean pubSubNoLocal) {
ResourceCloser closer = new ResourceCloser();
try {
String messageSelector = correlationId == null ? null : "JMSCorrelationID = '" 
+ correlationId + "'";
javax.jms.Message replyMessage = consumer.receive(receiveTimeout);
if (replyMessage == null) 
{ throw new RuntimeException("Timeout receiving message with correlationId " + 
correlationId); } 
Is this the problem why the temporary queue is not been closed in case of a 
timeout? Is there an solution for this problem?




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to